Ejemplo n.º 1
0
        public void UserManagementServiceUT_CheckPhoneNumberExistence_PhoneNumberDoesNotExistsFailure(string phoneNumber)
        {
            // Act: Check that a nonexistent phonenumber returns false.
            bool result = UserManagementServiceUT.CheckPhoneNumberExistence(phoneNumber);

            Assert.IsFalse(result);
        }
Ejemplo n.º 2
0
        public void UserManagementServiceUT_CheckPhoneNumberExistence_PhoneNumberExistsSuccess(bool isTemp, string username, string name, string email,
                                                                                               string phoneNumber, string password, int isDisabled, string userType, string salt)
        {
            // Arrange: Create users with the phonenumber inputted.
            bool createResult = UserManagementServiceUT.CreateUser(isTemp, username, name, email, phoneNumber, password, isDisabled, userType, salt);

            Assert.IsTrue(createResult);

            // Assert: check that an existing phonenumber returns true.
            bool result = UserManagementServiceUT.CheckPhoneNumberExistence(phoneNumber);

            Assert.IsTrue(result);

            // Cleanup: Delete Created user.
            bool deleteResult = UserManagementServiceUT.DeleteUser(username);

            Assert.IsTrue(deleteResult);
        }