{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/1240","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/1240/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/1240/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/1240/events","html_url":"https://github.com/nunit/nunit/pull/1240","id":130895395,"number":1240,"title":"EmptyConstraint - allow null string","user":{"login":"jhamm","id":98657,"avatar_url":"https://avatars.githubusercontent.com/u/98657?v=3","gravatar_id":"","url":"https://api.github.com/users/jhamm","html_url":"https://github.com/jhamm","followers_url":"https://api.github.com/users/jhamm/followers","following_url":"https://api.github.com/users/jhamm/following{/other_user}","gists_url":"https://api.github.com/users/jhamm/gists{/gist_id}","starred_url":"https://api.github.com/users/jhamm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhamm/subscriptions","organizations_url":"https://api.github.com/users/jhamm/orgs","repos_url":"https://api.github.com/users/jhamm/repos","events_url":"https://api.github.com/users/jhamm/events{/privacy}","received_events_url":"https://api.github.com/users/jhamm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-03T02:59:13Z","updated_at":"2016-02-06T05:25:31Z","closed_at":"2016-02-06T03:30:44Z","pull_request":{"url":"https://api.github.com/repos/nunit/nunit/pulls/1240","html_url":"https://github.com/nunit/nunit/pull/1240","diff_url":"https://github.com/nunit/nunit/pull/1240.diff","patch_url":"https://github.com/nunit/nunit/pull/1240.patch"},"body":"fix #1171 \r\n\r\nThe cases `Assert.That(null, Is.Not.Empty)` and `Is.Not.Null.Or.Empty` will continue to fail as they are written. The 'null' value cannot be checked to see if the EmptyConstraint types can be applied because this is lost.\r\n\r\nIf the test were rewritten as:\r\n````\r\nstring actual = null;\r\nAssert.That(actual, Is.Empty);\r\n\r\n//or\r\n\r\nAssert.That((string)null, Is.Empty);\r\n````\r\n\r\nI think that most tests will have the type information like the rewritten test cases as opposed to having just `null`.\r\n\r\nThese tests throw the AssertionException as expected. If the type cannot be applied, (not string, collection, or DirectoryInfo), the ArgumentException will be thrown.\r\n"},"comment":{"url":"https://api.github.com/repos/nunit/nunit/issues/comments/180690458","html_url":"https://github.com/nunit/nunit/pull/1240#issuecomment-180690458","issue_url":"https://api.github.com/repos/nunit/nunit/issues/1240","id":180690458,"user":{"login":"CharliePoole","id":2678661,"avatar_url":"https://avatars.githubusercontent.com/u/2678661?v=3","gravatar_id":"","url":"https://api.github.com/users/CharliePoole","html_url":"https://github.com/CharliePoole","followers_url":"https://api.github.com/users/CharliePoole/followers","following_url":"https://api.github.com/users/CharliePoole/following{/other_user}","gists_url":"https://api.github.com/users/CharliePoole/gists{/gist_id}","starred_url":"https://api.github.com/users/CharliePoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharliePoole/subscriptions","organizations_url":"https://api.github.com/users/CharliePoole/orgs","repos_url":"https://api.github.com/users/CharliePoole/repos","events_url":"https://api.github.com/users/CharliePoole/events{/privacy}","received_events_url":"https://api.github.com/users/CharliePoole/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T05:25:31Z","updated_at":"2016-02-06T05:25:31Z","body":"In that case, we should at least check to see if our current behavior matches what we defined as desirable in the discussion."}}