{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/1230","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/1230/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/1230/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/1230/events","html_url":"https://github.com/nunit/nunit/pull/1230","id":130087943,"number":1230,"title":"Add ability for testcasedatasource to have parameters passed to methods","user":{"login":"dicko2","id":15168410,"avatar_url":"https://avatars.githubusercontent.com/u/15168410?v=3","gravatar_id":"","url":"https://api.github.com/users/dicko2","html_url":"https://github.com/dicko2","followers_url":"https://api.github.com/users/dicko2/followers","following_url":"https://api.github.com/users/dicko2/following{/other_user}","gists_url":"https://api.github.com/users/dicko2/gists{/gist_id}","starred_url":"https://api.github.com/users/dicko2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dicko2/subscriptions","organizations_url":"https://api.github.com/users/dicko2/orgs","repos_url":"https://api.github.com/users/dicko2/repos","events_url":"https://api.github.com/users/dicko2/events{/privacy}","received_events_url":"https://api.github.com/users/dicko2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-31T05:59:02Z","updated_at":"2016-02-03T12:27:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nunit/nunit/pulls/1230","html_url":"https://github.com/nunit/nunit/pull/1230","diff_url":"https://github.com/nunit/nunit/pull/1230.diff","patch_url":"https://github.com/nunit/nunit/pull/1230.patch"},"body":"Comments on Issue #7 reflect changes in here. However @CharliePoole mentioned creating a new issue for this change as its actually unrelated to the original intention of issue number 7.\r\n\r\nOne thing i did consider changing is making the TestCaseDataSource \"blow up\", or not, if someone tries to use it with a property or field instead of a method. Personally I don't like things that silently fail, but would someone ever try to pass parameters to a field or property?"},"comment":{"url":"https://api.github.com/repos/nunit/nunit/issues/comments/179196551","html_url":"https://github.com/nunit/nunit/pull/1230#issuecomment-179196551","issue_url":"https://api.github.com/repos/nunit/nunit/issues/1230","id":179196551,"user":{"login":"dicko2","id":15168410,"avatar_url":"https://avatars.githubusercontent.com/u/15168410?v=3","gravatar_id":"","url":"https://api.github.com/users/dicko2","html_url":"https://github.com/dicko2","followers_url":"https://api.github.com/users/dicko2/followers","following_url":"https://api.github.com/users/dicko2/following{/other_user}","gists_url":"https://api.github.com/users/dicko2/gists{/gist_id}","starred_url":"https://api.github.com/users/dicko2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dicko2/subscriptions","organizations_url":"https://api.github.com/users/dicko2/orgs","repos_url":"https://api.github.com/users/dicko2/repos","events_url":"https://api.github.com/users/dicko2/events{/privacy}","received_events_url":"https://api.github.com/users/dicko2/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T12:27:56Z","updated_at":"2016-02-03T12:27:56Z","body":"Ok cool, I stared working on some of these, and I've got the checks and error messages done. but my question is how to write a unit test for failure of an attribute?\r\n\r\nI've got this example of a test that generates the error about the wrong number of arguments.\r\n\r\n```csharp\r\n[Test, Category(\"Top\"), TestCaseSource(typeof(DivideDataProvider), \"HereIsTheDataWithParameters\", new object[] { 100, 4 })]\r\n        public void SourceInAnotherClassPassingSomeDataToConstructorWrongNumberParam(int n, int d, int q)\r\n        {\r\n// code here is never reached\r\n        }\r\n```\r\nNormally i would be testing inside the test method itself, and be able to put a try-catch in, check the error thrown is correct and assert form there. This however is throwing an error from the attribute so I am a bit stumped at how to make the test pass, I am guessing that is why a few of them are erroring now yea? Or am I looking at this the wrong way maybe?\r\n"}}