{"action":"created","issue":{"url":"https://api.github.com/repos/fixie/fixie/issues/83","labels_url":"https://api.github.com/repos/fixie/fixie/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/fixie/fixie/issues/83/comments","events_url":"https://api.github.com/repos/fixie/fixie/issues/83/events","html_url":"https://github.com/fixie/fixie/issues/83","id":55940428,"number":83,"title":"Allow discovering non-public methods","user":{"login":"TheCloudlessSky","id":613788,"avatar_url":"https://avatars.githubusercontent.com/u/613788?v=3","gravatar_id":"","url":"https://api.github.com/users/TheCloudlessSky","html_url":"https://github.com/TheCloudlessSky","followers_url":"https://api.github.com/users/TheCloudlessSky/followers","following_url":"https://api.github.com/users/TheCloudlessSky/following{/other_user}","gists_url":"https://api.github.com/users/TheCloudlessSky/gists{/gist_id}","starred_url":"https://api.github.com/users/TheCloudlessSky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheCloudlessSky/subscriptions","organizations_url":"https://api.github.com/users/TheCloudlessSky/orgs","repos_url":"https://api.github.com/users/TheCloudlessSky/repos","events_url":"https://api.github.com/users/TheCloudlessSky/events{/privacy}","received_events_url":"https://api.github.com/users/TheCloudlessSky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-29T18:54:03Z","updated_at":"2015-01-29T19:05:20Z","closed_at":null,"body":"Right now, [`MethodDiscoverer` does not allow discovering non-public instance methods](https://github.com/fixie/fixie/blob/cbe0c60eea34c2e87d82c410722aecbafb5f134c/src/Fixie/Internal/MethodDiscoverer.cs#L21). With xUnit.net, we have a lot of tests defined as:\r\n\r\n```csharp\r\n[Fact]\r\nvoid FooBar()\r\n{\r\n    // ...\r\n}\r\n```\r\n\r\nIs there any way we could maybe have a boolean option on `Configuration` like `AllowNonPublicMethods` which would be `false` by default:\r\n\r\n```csharp\r\npublic IReadOnlyList<MethodInfo> TestMethods(Type testClass)\r\n{\r\n    try\r\n    {\r\n        var flags = BindingFlags.Public | BindingFlags.Instance;\r\n        if (config.AllowNonPublicMethods)\r\n        {\r\n            flags |= BindingFlags.NonPublic;\r\n        }\r\n        var methods = testClass.GetMethods(flags).Where(IsMatch).ToArray();\r\n    }\r\n    // ...\r\n}\r\n```\r\n\r\nOr, remove the `Public` flag all together (and change the `DefaultConvention` to ignore private methods)?"},"comment":{"url":"https://api.github.com/repos/fixie/fixie/issues/comments/72083746","html_url":"https://github.com/fixie/fixie/issues/83#issuecomment-72083746","issue_url":"https://api.github.com/repos/fixie/fixie/issues/83","id":72083746,"user":{"login":"ChrisMissal","id":67798,"avatar_url":"https://avatars.githubusercontent.com/u/67798?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisMissal","html_url":"https://github.com/ChrisMissal","followers_url":"https://api.github.com/users/ChrisMissal/followers","following_url":"https://api.github.com/users/ChrisMissal/following{/other_user}","gists_url":"https://api.github.com/users/ChrisMissal/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisMissal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisMissal/subscriptions","organizations_url":"https://api.github.com/users/ChrisMissal/orgs","repos_url":"https://api.github.com/users/ChrisMissal/repos","events_url":"https://api.github.com/users/ChrisMissal/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisMissal/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T19:05:20Z","updated_at":"2015-01-29T19:05:20Z","body":"I believe you can just add this to your convention:\r\n\r\n```csharp\r\nMethods.Where(mi => !mi.IsPublic);\r\n```\r\n\r\nWarning: I haven't actually tested this. :)"}}