{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/2969","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/2969/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/2969/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/2969/events","html_url":"https://github.com/nunit/nunit/issues/2969","id":352445098,"node_id":"MDU6SXNzdWUzNTI0NDUwOTg=","number":2969,"title":"Missing constraint for testing object is in collection?","user":{"login":"richard-fine","id":588194,"node_id":"MDQ6VXNlcjU4ODE5NA==","avatar_url":"https://avatars2.githubusercontent.com/u/588194?v=4","gravatar_id":"","url":"https://api.github.com/users/richard-fine","html_url":"https://github.com/richard-fine","followers_url":"https://api.github.com/users/richard-fine/followers","following_url":"https://api.github.com/users/richard-fine/following{/other_user}","gists_url":"https://api.github.com/users/richard-fine/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-fine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-fine/subscriptions","organizations_url":"https://api.github.com/users/richard-fine/orgs","repos_url":"https://api.github.com/users/richard-fine/repos","events_url":"https://api.github.com/users/richard-fine/events{/privacy}","received_events_url":"https://api.github.com/users/richard-fine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-21T08:54:15Z","updated_at":"2018-08-21T16:37:03Z","closed_at":null,"author_association":"NONE","body":"I want to write an assert like this:\r\n\r\n`Assert.That(item, Is.ContainedIn(collection));`\r\n\r\nYou're probably thinking: Why not just write \r\n\r\n`Assert.That(collection, Has.Member(item));`\r\n\r\ninstead? Simple - because that reverse the roles of the 'actual' and 'expected' entities. My collection is a static thing, and my item is the 'potentially wrong' thing that is actually under test. So I want to write it the former way, partly for code clarity and partly to give the best possible failure messages.\r\n\r\nI know that I can write this constraint myself, but I wanted to bring it up because a) maybe it exists under some other name and I'm just missing it, and b) I think it's worth considering for inclusion in the framework itself."},"comment":{"url":"https://api.github.com/repos/nunit/nunit/issues/comments/414739460","html_url":"https://github.com/nunit/nunit/issues/2969#issuecomment-414739460","issue_url":"https://api.github.com/repos/nunit/nunit/issues/2969","id":414739460,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDczOTQ2MA==","user":{"login":"ChrisMaddock","id":4837132,"node_id":"MDQ6VXNlcjQ4MzcxMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/4837132?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisMaddock","html_url":"https://github.com/ChrisMaddock","followers_url":"https://api.github.com/users/ChrisMaddock/followers","following_url":"https://api.github.com/users/ChrisMaddock/following{/other_user}","gists_url":"https://api.github.com/users/ChrisMaddock/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisMaddock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisMaddock/subscriptions","organizations_url":"https://api.github.com/users/ChrisMaddock/orgs","repos_url":"https://api.github.com/users/ChrisMaddock/repos","events_url":"https://api.github.com/users/ChrisMaddock/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisMaddock/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T16:37:03Z","updated_at":"2018-08-21T16:37:03Z","author_association":"MEMBER","body":"You're after the newly added `Is.AnyOf()` I believe, newly added in 3.10 by @Dreamescaper!\r\n\r\nhttps://github.com/nunit/nunit/pull/2703\r\n\r\nI'm afraid it's so new, it's not yet in our docs. (But we'd love a contribution to fix that, if you'd be interested!?) "}}
{"actor":{"display_login":"ChrisMaddock"}}