public void ShouldErrorAddressLine1WhenAddressTypeIsAddress(string address)
        {
            // Arrange
            _sut = new AddressExtendedValidator(ContactType.address);

            var model = new AddressExtended()
            {
                AddressLine1 = address
            };

            // Act
            var result = _sut.TestValidate(model);

            // Assert
            result.ShouldHaveValidationErrorFor(x => x.AddressLine1);
        }
        public void ShouldErrorPostCodeWhenAddressTypeIsAddress(string postCode)
        {
            // Arrange
            _sut = new AddressExtendedValidator(ContactType.address);

            var model = new AddressExtended()
            {
                PostCode = postCode
            };

            // Act
            var result = _sut.TestValidate(model);

            // Assert
            result.ShouldHaveValidationErrorFor(x => x.PostCode);
        }
 public AddressExtendedValidatorTests()
 {
     // Set contact type as phone by default
     _sut = new AddressExtendedValidator(ContactType.phone);
 }