{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Testing/issues/79","labels_url":"https://api.github.com/repos/aspnet/Testing/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Testing/issues/79/comments","events_url":"https://api.github.com/repos/aspnet/Testing/issues/79/events","html_url":"https://github.com/aspnet/Testing/issues/79","id":63320135,"number":79,"title":"Shared VerifyFrameworkServicesTest helper","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-20T22:22:45Z","updated_at":"2015-07-08T21:19:33Z","closed_at":null,"body":"So I think we can now have a shared test method which validates AddXyz setups ApplicationServices properly now that we can do this in a standard way for all of the AddFramework() methods...\r\n\r\ncc @davidfowl @divega Thoughts?\r\n\r\n```\r\npublic void VerifyAddFrameworkServices(Action<IServiceCollection> addServices, IEnumerable<Type> requiredServices>) {\r\n    var context = new HostingContext();\r\n    addServices(context.Services);\r\n    var appServices = HostingEngine.CreateApplicationServices(context);\r\n    foreach (var serviceType in requiredServices) {\r\n        Assert.NotNull(appServices.GetRequiredService(serviceType));\r\n    }    \r\n}\r\n\r\n[Fact]\r\nvoid VerifyAddIdentity() {\r\n    VerifyAddFrameworkServices(services => services.AddIdentity<TUser, TRole>(), \r\n          new Type[] { typeof(UserManager<TUser, TRole>), typeof(RoleManager<TRole>));\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/Testing/issues/comments/119733818","html_url":"https://github.com/aspnet/Testing/issues/79#issuecomment-119733818","issue_url":"https://api.github.com/repos/aspnet/Testing/issues/79","id":119733818,"user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T21:19:33Z","updated_at":"2015-07-08T21:19:33Z","body":"Sure, I'm guessing most repos have some form of verifying this already, but could be useful to standardize"}}