Ejemplo n.º 1
0
        public void Validate_WhenCustomerIsValid_NothingHappens()
        {
            //arrange
            var customer = new CustomerForTestsBuilder().Build();

            //act
            customer.Validate();

            //assert nothing
        }
Ejemplo n.º 2
0
        public void Validate_WhenAddressIsNull_ThrowsInvalidCustomerException()
        {
            //arrange
            var customer = new CustomerForTestsBuilder().WithoutAddress().Build();

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

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