public async Task Handle_GivenExistCustomer_SholudBeWithOutExceptionAsync() { var command = new UpsertCustomerCommandHandler(_context); var existCustomer = new UpsertCustomerCommand() { Id = 1, FirstName = "saji2", LastName = "Rei", DateOfBirth = "18/06/2000", BankAccountNumber = "sadasd", Email = "*****@*****.**", PhoneNumber = "+989399158667" }; var result = await command.Handle(existCustomer, CancellationToken.None); Assert.IsType <Unit>(result); }
public async Task Handle_GivenNewCustomer_SholudBeWithOutExceptionAsync() { var command = new UpsertCustomerCommandHandler(_context); var newCustomer = new UpsertCustomerCommand() { FirstName = "saji2", LastName = "rei2", DateOfBirth = "20/10/1990", Email = "*****@*****.**", PhoneNumber = "12345678/9", BankAccountNumber = "544" }; var result = await command.Handle(newCustomer, CancellationToken.None); Assert.IsType <Unit>(result); }