public void InnerFilter_ReturnsSpecifiedInstance() { // Arrange IAuthenticationFilter expectedInnerFilter = CreateDummyFilter(); HostAuthenticationAttribute product = CreateProductUnderTest(expectedInnerFilter); // Act IAuthenticationFilter innerFilter = product.InnerFilter; // Assert Assert.Same(expectedInnerFilter, innerFilter); }
public void AuthenticationType_IsSpecifiedInstance_WhenUsingConstructorWithString() { // Arrange string expectedAuthenticationType = "Ignore"; HostAuthenticationAttribute product = CreateProductUnderTest(expectedAuthenticationType); // Act string authenticationType = product.AuthenticationType; // Assert Assert.Same(expectedAuthenticationType, authenticationType); }
public void InnerFilter_IsHostAuthenticationFilter_WhenUsingConstructorWithString() { // Arrange string expectedAuthenticationType = "Ignore"; HostAuthenticationAttribute product = CreateProductUnderTest(expectedAuthenticationType); // Act IAuthenticationFilter innerFilter = product.InnerFilter; // Assert HostAuthenticationFilter typedInnerFilter = Assert.IsType <HostAuthenticationFilter>(innerFilter); Assert.Same(expectedAuthenticationType, typedInnerFilter.AuthenticationType); }
// Summary: // Initializes a new instance of the System.Web.Http.HostAuthenticationAttribute // class. // // Parameters: // authenticationType: // The authentication type of the OWIN middleware to use. public SkillsmartHostAuth(string authenticationType) { haa = new HostAuthenticationAttribute(authenticationType); }