public void InncorrectUsername() { var provider = new CookieAuthorizationDataProvider(null); var claim = new Claim("TestType", "TestValue"); var httpContext = new HttpContextBuilder().Build(); provider.AddClaim(claim, httpContext, "*****@*****.**"); var claims = provider.GetClaims(httpContext, "*****@*****.**"); claims.Length.Should().Be(0); }
public void GetClaim() { var provider = new CookieAuthorizationDataProvider(null); var claim = new Claim("TestType", "TestValue"); var httpContext = new HttpContextBuilder().Build(); provider.AddClaim(claim, httpContext, "*****@*****.**"); var claims = provider.GetClaims(httpContext, "*****@*****.**"); claims.Length.Should().Be(1); claims[0].Type.Should().Be("TestType"); claims[0].Value.Should().Be("TestValue"); }