private static PassiveAuthenticationMessageHandler CreateProductUnderTest(HttpMessageHandler innerHandler) { PassiveAuthenticationMessageHandler handler = new PassiveAuthenticationMessageHandler(); handler.InnerHandler = innerHandler; return(handler); }
private static PassiveAuthenticationMessageHandler CreateProductUnderTest( IHostPrincipalService principalService, HttpMessageHandler innerHandler) { PassiveAuthenticationMessageHandler handler = new PassiveAuthenticationMessageHandler(principalService); handler.InnerHandler = innerHandler; return(handler); }
public void ConstructorWithPrincipalService_SetsPrincipalService() { // Arrange IHostPrincipalService expectedPrincipalService = CreateDummyPrincipalService(); PassiveAuthenticationMessageHandler handler = new PassiveAuthenticationMessageHandler( expectedPrincipalService); // Act IHostPrincipalService principalService = handler.HostPrincipalService; // Assert Assert.Same(expectedPrincipalService, principalService); }
public void ConstructorWithConfiguration_SetsPrincipalService() { // Arrange IHostPrincipalService expectedPrincipalService = CreateDummyPrincipalService(); IHostPrincipalService principalService; using (HttpConfiguration configuration = new HttpConfiguration()) { configuration.Services.Replace(typeof(IHostPrincipalService), expectedPrincipalService); PassiveAuthenticationMessageHandler handler = new PassiveAuthenticationMessageHandler(configuration); // Act principalService = handler.HostPrincipalService; } // Assert Assert.Same(expectedPrincipalService, principalService); }
private static PassiveAuthenticationMessageHandler CreateProductUnderTest(HttpMessageHandler innerHandler) { PassiveAuthenticationMessageHandler handler = new PassiveAuthenticationMessageHandler(); handler.InnerHandler = innerHandler; return handler; }
private static PassiveAuthenticationMessageHandler CreateProductUnderTest( IHostPrincipalService principalService, HttpMessageHandler innerHandler) { PassiveAuthenticationMessageHandler handler = new PassiveAuthenticationMessageHandler(principalService); handler.InnerHandler = innerHandler; return handler; }