public void ApplyDefaultForPrincipal_WhenDefaultCountryCodeIsWhiteSpace_AssertDefaultForPrincipalEqualToFalse() { ICountry sut = CreateSut(); sut.ApplyDefaultForPrincipal(" "); Assert.That(sut.DefaultForPrincipal, Is.False); }
public void ApplyDefaultForPrincipal_WhenDefaultCountryCodeDoesNotMatchCountryCode_AssertDefaultForPrincipalEqualToFalse() { ICountry sut = CreateSut(); sut.ApplyDefaultForPrincipal(_fixture.Create <string>()); Assert.That(sut.DefaultForPrincipal, Is.False); }
public void ApplyDefaultForPrincipal_WhenDefaultCountryCodeIsEmpty_AssertDefaultForPrincipalEqualToFalse() { ICountry sut = CreateSut(); sut.ApplyDefaultForPrincipal(string.Empty); Assert.That(sut.DefaultForPrincipal, Is.False); }
public void ApplyDefaultForPrincipal_WhenDefaultCountryCodeMatchCountryCode_AssertDefaultForPrincipalEqualToTrue() { string countryCode = _fixture.Create <string>(); ICountry sut = CreateSut(countryCode); sut.ApplyDefaultForPrincipal(countryCode.ToUpper()); Assert.That(sut.DefaultForPrincipal, Is.True); }
public ICountry ApplyLogicForPrincipal(ICountry country) { NullGuard.NotNull(country, nameof(country)); string countryCode = _claimResolver.GetCountryCode(); country.ApplyDefaultForPrincipal(countryCode); return(country); }