public void Create_ValidMailAddress_ShouldSave()
        {
            // Arrange
            var createCommmand = new CustomerCreateCommand() {
                FirstName = "Mohamed",
                LastName = "Ahmed"
            };

            var customerAddressBuilder = new MockedCustomerAddressBuilder();
            var customerRepository = new MockedCustomerRepository();

            CustomerService_1 customerService = new CustomerService_1(customerAddressBuilder, customerRepository);

            // Act
            customerService.Create(createCommmand);

            // Assert
            Assert.IsTrue(customerRepository.IsSaveCalled);
        }
Exemple #2
0
        public void Create_ValidMailAddress_ShouldSave()
        {
            // Arrange
            var createCommmand = new CustomerCreateCommand()
            {
                FirstName = "Mohamed",
                LastName  = "Ahmed"
            };

            var customerAddressBuilder = new MockedCustomerAddressBuilder();
            var customerRepository     = new MockedCustomerRepository();

            CustomerService_1 customerService = new CustomerService_1(customerAddressBuilder, customerRepository);

            // Act
            customerService.Create(createCommmand);

            // Assert
            Assert.IsTrue(customerRepository.IsSaveCalled);
        }