public void ShouldRegisterCustomerWhenCommandIsValid() { var command = new CreateCustomerCommand(); command.FistName = "marcos"; command.LastName = "Lima"; command.Document = "70858024055"; command.Email = "*****@*****.**"; command.Phone = "9924343443"; var handler = new CustomerCommandHandle(new FakeCustomerRepository(), new FakeEmailService()); var result = handler.Handle(command); Assert.AreNotEqual(null, result); Assert.AreEqual(true, handler.IsValid); }
public CustomerController(ICustomerRepository customerRepository, CustomerCommandHandle handle) { _customerRepository = customerRepository; _handle = handle; }