public void CreatingInvalidEuropeanTaxpayerNumberFails(string countryCode, string taxpayerNumber) { var country = countryCode.IsNotNull() ? Country.GetByCode(countryCode).Get() : null; var europeanCountry = countryCode.IsNotNull() ? EuropeanUnionCountry.GetByCode(countryCode).Get() : null; Assert.IsTrue(EuropeanUnionTaxpayerIdentificationNumber.Create(europeanCountry, taxpayerNumber).IsError); Assert.IsTrue(TaxpayerIdentificationNumber.Create(country, taxpayerNumber).IsError); }
public void CreatingValidEuropeanTaxpayerNumberSucceeds(string countryCode, string taxpayerNumber) { var country = Country.GetByCode(countryCode).Get(); var europeanCountry = EuropeanUnionCountry.GetByCode(countryCode).Get(); Assert.IsTrue(EuropeanUnionTaxpayerIdentificationNumber.Create(europeanCountry, taxpayerNumber).IsSuccess); Assert.IsTrue(TaxpayerIdentificationNumber.Create(country, taxpayerNumber).IsSuccess); }
public void EuropeanCountryWithValidCountryCodeFound(string countryCode) { Assert.IsTrue(Country.GetByCode(countryCode).NonEmpty); Assert.IsTrue(EuropeanUnionCountry.GetByCode(countryCode).NonEmpty); }
public void EuropeanCountryWithInvalidCountryCodeNotFound(string countryCode) { Assert.IsTrue(EuropeanUnionCountry.GetByCode(countryCode).IsEmpty); }