{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/1856","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/1856/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/1856/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/1856/events","html_url":"https://github.com/nunit/nunit/issues/1856","id":184543065,"number":1856,"title":"Define TestCaseSource equivalent that does not give an error when there is no data","user":{"login":"SeanKilleen","id":2148318,"avatar_url":"https://avatars.githubusercontent.com/u/2148318?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanKilleen","html_url":"https://github.com/SeanKilleen","followers_url":"https://api.github.com/users/SeanKilleen/followers","following_url":"https://api.github.com/users/SeanKilleen/following{/other_user}","gists_url":"https://api.github.com/users/SeanKilleen/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanKilleen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanKilleen/subscriptions","organizations_url":"https://api.github.com/users/SeanKilleen/orgs","repos_url":"https://api.github.com/users/SeanKilleen/repos","events_url":"https://api.github.com/users/SeanKilleen/events{/privacy}","received_events_url":"https://api.github.com/users/SeanKilleen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nunit/nunit/labels/is:idea","name":"is:idea","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-21T18:32:45Z","updated_at":"2016-10-25T12:49:58Z","closed_at":null,"body":"Hi all,\r\n\r\nThank you for a fantastic product that keeps our codebase in shape.\r\n\r\nI am in the process of trying to confirm whether the \"issue\" I'm seeing is:\r\n\r\n* A misunderstanding of NUnit on my part (expectation is wrong)\r\n* A difference in the way test runners treat this scenario \r\n* An issue with how NUnit services results in this issue.\r\n\r\n## Background\r\n* I have a `TestCaseSource` that houses the concept of a temporary exemption (when testing some security rules). \r\n* When an item is in the temporary exemption list, certain rules / tests apply. \r\n* Occasionally, the temporary exemptions lists are empty, leading to what I describe below.\r\n\r\n## Reproduction steps\r\n* Create a `TestCaseSource` similar to the following (the `ControllerMethodPair` class is mine; substitute any POCO): \r\n\r\n```csharp\r\npublic static readonly List<ControllerMethodPair> TemporaryExemptionsList = new List<ControllerMethodPair> {\r\n                // This list is empty. To add a temporary exemption, use the syntax:\r\n                // new ControllerMethodPair(typeof(ControllerName), nameof(ControllerName.MethodName))\r\n            };\r\n```\r\n* Write a test that uses the list as a source, e.g. below:\r\n\r\n```csharp\r\n        [TestCaseSource(typeof(ControllerActionPermissions_TestCaseSources), nameof(ControllerActionPermissions_TestCaseSources.TemporaryExemptionsList))]\r\n        public void TemporaryExemptionListItemsShouldNotHaveAPermanentExemption(ControllerMethodPair pairToTest)\r\n        {\r\n            SecurityTestHelper.HasPermanentExemption(pairToTest).Should().BeFalse(\"The controller {0}.{1} is in the temporary list but also has a permanent exemption. Please ensure only one of these is the case\", pairToTest.Controller.Name, pairToTest.MethodName);\r\n        }\r\n```\r\n\r\n* Run the tests when the temporary exemptions list is empty.\r\n\r\n## Expected Result\r\nThe tests run and are ignored by my test runner, or given an \"inconclusive\" label of some kind.\r\n\r\n## Actual Result\r\nI see -- at least in ReSharper's test runner -- that the tests fail. See the screenshot below:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/2148318/19607904/f222d8f2-979a-11e6-85cd-e429228ab8fc.png)\r\n\r\nThis makes sense in a way, but I saw it more as a warning and less as a failure.\r\n\r\nIs this something I'm missing as to how NUnit works? Or a potential issue with the test runner itself?\r\n\r\nI'll look at this in the console runner as well but wanted to put it out there in the meantime.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/nunit/nunit/issues/comments/256025294","html_url":"https://github.com/nunit/nunit/issues/1856#issuecomment-256025294","issue_url":"https://api.github.com/repos/nunit/nunit/issues/1856","id":256025294,"user":{"login":"rprouse","id":493828,"avatar_url":"https://avatars.githubusercontent.com/u/493828?v=3","gravatar_id":"","url":"https://api.github.com/users/rprouse","html_url":"https://github.com/rprouse","followers_url":"https://api.github.com/users/rprouse/followers","following_url":"https://api.github.com/users/rprouse/following{/other_user}","gists_url":"https://api.github.com/users/rprouse/gists{/gist_id}","starred_url":"https://api.github.com/users/rprouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rprouse/subscriptions","organizations_url":"https://api.github.com/users/rprouse/orgs","repos_url":"https://api.github.com/users/rprouse/repos","events_url":"https://api.github.com/users/rprouse/events{/privacy}","received_events_url":"https://api.github.com/users/rprouse/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T12:49:58Z","updated_at":"2016-10-25T12:49:58Z","body":"Sorry, I am reopening this. As @CharliePoole says, the idea needs some fleshing out though before we will implement."}}
{"actor":{"display_login":"rprouse"}}