public void ExceptionTestFor_UserCannotblank() { Customer user = new Customer() { UserName = "******", Password = "" }; //Assert var ex = Assert.Throws <FieldscannotEmptyException>(() => _CustomerSevices.SignUp(user)); Assert.Equal("Fields can not be blank ", ex.Messages); }
public void Test_for_Register() { Customer customer = new Customer() { UserId = 1, Address = "aa", Email = "*****@*****.**", Password = "******", PhoneNumber = "11111", UserName = "******" }; var Result = _CustomerSevices.SignUp(customer); Assert.NotNull(Result); }