public async Task AddCustomer_New_ReturnTrueAsync() { //Arrange var customerModel = new CustomerModel() { FirstName = "Rachelly", LastName = "Lamberger", Email = "*****@*****.**", Password = "******", }; var emailVerificationModel = new EmailVerificationModel() { VerificationCode = 1234, Email = "*****@*****.**", }; var verificationHelperModel = new VerificationHelperModel() { Customer = customerModel, EmailVerification = emailVerificationModel }; //Act var result = await _service.AddCustomer(verificationHelperModel); //Assert Assert.True(result); }
public bool PostCustomer([FromBody] CustomerDTO customer) { try { return(_service.AddCustomer(_mapper.Map <CustomerModel>(customer))); } catch (Exception e) { throw new Exception(e.Message); } }
public async Task <bool> PostCustomer([FromBody] CustomerDTO customer) { try { return(await _service.AddCustomer(_mapper.Map <VerificationHelperModel>(customer))); } catch (Exception e) { throw new Exception(e.Message); } }
public void AddCustomer_New_ReturnTrue() { //Arrange var customerModel = new CustomerModel() { FirstName = "Rachelly", LastName = "Lamberger", Email = "*****@*****.**", Password = "******" }; //Act var result = _service.AddCustomer(customerModel); //Assert Assert.True(result); }