Exemplo n.º 1
0
        public void ValidAddress_ReturnsSuccessResult()
        {
            var address = AddressTestData.GetValidTestAddress();

            var result = validator.Validate(address);

            Assert.True(result.IsValid);
        }
Exemplo n.º 2
0
 private Exporter GetValidExporter()
 {
     return(new Exporter(new Guid("7C898A2C-D940-4F2E-BB89-6301B99B69A3"))
     {
         Address = AddressTestData.GetValidTestAddress(),
         Contact = ContactTestData.GetValidTestContact(),
         BusinessName = "Mike and Eliot Bros."
     });
 }
Exemplo n.º 3
0
        public void PostalCodeMissing_CountryUK_ReturnsFailureResult(string postcode)
        {
            var invalidAddress = AddressTestData.GetValidTestAddress();

            invalidAddress.CountryId  = unitedKingdomCountryId;
            invalidAddress.PostalCode = postcode;

            validator.ShouldHaveValidationErrorFor(x => x.PostalCode, invalidAddress);
        }
Exemplo n.º 4
0
 private Producer GetValidProducer()
 {
     return(new Producer(new Guid("F69C8CF2-ADF7-4065-B008-B57871E85A96"))
     {
         Address = AddressTestData.GetValidTestAddress(),
         Contact = ContactTestData.GetValidTestContact(),
         BusinessName = "Mike and Eliot Bros.",
         AreMultiple = false
     });
 }
Exemplo n.º 5
0
 private Importer GetValidImporter()
 {
     return(new Importer(new Guid("0C2A45DE-CEF1-4BD7-92C5-1B400CEDB99C"))
     {
         Address = AddressTestData.GetValidTestAddress(),
         Contact = ContactTestData.GetValidTestContact(),
         BusinessName = "Mike and Eliot Bros.",
         RegistrationNumber = "12987457",
         Type = BusinessType.Other
     });
 }
Exemplo n.º 6
0
 private Facility GetValidFacility()
 {
     return(new Facility(new Guid("D39DA9E3-0E5F-4DA4-8560-3743029CE76F"))
     {
         Address = AddressTestData.GetValidTestAddress(),
         Contact = ContactTestData.GetValidTestContact(),
         BusinessName = "Woking Waste Facility",
         Id = new Guid("B86BBCD0-9196-4E54-BDB2-3E65180D83DD"),
         RegistrationNumber = "99462556AAB88",
         Type = BusinessType.Other,
         IsActualSite = true
     });
 }