public CustomerForTestsBuilder()
        {
            var fixture = new Fixture();

            _addressBuilder  = new AddressForTestsBuilder();
            _withAddress     = true;
            _name            = fixture.Create <string>();
            _surName         = fixture.Create <string>();
            _telephoneNumber = fixture.Create <string>();
        }
Пример #2
0
        public void Validate_StreetNameIsNull_ThrowsInvalidAddressException()
        {
            //arange
            var address = new AddressForTestsBuilder().WithoutStreetName().Build();

            //act
            var exception = Record.Exception(() => address.Validate());

            //assert
            Assert.IsType <AddressInvalidException>(exception);
        }