コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void EuropeanCountryWithValidCountryCodeFound(string countryCode)
 {
     Assert.IsTrue(Country.GetByCode(countryCode).NonEmpty);
     Assert.IsTrue(EuropeanUnionCountry.GetByCode(countryCode).NonEmpty);
 }
コード例 #4
0
 public void EuropeanCountryWithInvalidCountryCodeNotFound(string countryCode)
 {
     Assert.IsTrue(EuropeanUnionCountry.GetByCode(countryCode).IsEmpty);
 }