private IEnumerable <Claim> GetClaims() { return(new List <Claim> { ClaimHelper.CreateCommonDataClaim(), ClaimHelper.CreateContactsClaim(), ClaimHelper.CreateCountryCodeClaim("DK") }); }
public void GetCountryCode_WhenCalledAndPrincipalHasCountryCodeClaim_ReturnsCountryCode() { string countryCode = _fixture.Create <string>(); IPrincipal principal = CreateClaimsPrincipal(new[] { new Claim(_fixture.Create <string>(), _fixture.Create <string>()), ClaimHelper.CreateCountryCodeClaim(countryCode) }); IClaimResolver sut = CreateSut(principal); string result = sut.GetCountryCode(); Assert.That(result, Is.EqualTo(countryCode)); }