public void UserManagementServiceUT_CheckEmailExistence_EmailDoesNotExistsFailure(string email) { // Act: check that a non existing email returns false. bool result = UserManagementServiceUT.CheckEmailExistence(email); Assert.IsFalse(result); }
public void UserManagementServiceUT_CheckEmailExistence_EmailExistsSuccess(bool isTemp, string username, string name, string email, string phoneNumber, string password, int isDisabled, string userType, string salt) { // Arrange: Create user. bool createResult = UserManagementServiceUT.CreateUser(isTemp, username, name, email, phoneNumber, password, isDisabled, userType, salt); Assert.IsTrue(createResult); // Act: check that an existing email returns true. bool result = UserManagementServiceUT.CheckEmailExistence(email); Assert.IsTrue(result); // Cleanup: Delete that user bool deleteResult = UserManagementServiceUT.DeleteUser(username); Assert.IsTrue(deleteResult); }