Skip to content
Snippets Groups Projects
Commit d8bd33bd authored by CONGRANLI's avatar CONGRANLI
Browse files

delete the NULL

parent 11d82c6e
No related branches found
No related tags found
No related merge requests found
Pipeline #5743 passed
...@@ -41,9 +41,16 @@ public class BoundaryTests ...@@ -41,9 +41,16 @@ public class BoundaryTests
assertFalse(WeakPassphraseException); assertFalse(WeakPassphraseException);
} }
@Test public void ASCII() { @Test public void Contains3() throws DuplicateUserException {
boolean WeakPassphraseException = false; boolean WeakPassphraseException = false;
String passbookUsername = "AlexTina";
String passbookphrase = "'{@[/:Cd";
try {
pb.addUser(passbookUsername, passbookphrase);
}catch(WeakPassphraseException e) {
WeakPassphraseException = true;
}
assertTrue(WeakPassphraseException);
} }
......
...@@ -152,7 +152,7 @@ public class PartitioningTests ...@@ -152,7 +152,7 @@ public class PartitioningTests
{ {
boolean WeakPassphraseException = false; boolean WeakPassphraseException = false;
String passbookUsername = "AlexTina"; String passbookUsername = "AlexTina";
String passbookphrase = "^&*($%@#"; String passbookphrase = "'{@[/:Cd";
try{ try{
pb.addUser(passbookUsername,passbookphrase); pb.addUser(passbookUsername,passbookphrase);
} }
...@@ -277,22 +277,7 @@ public class PartitioningTests ...@@ -277,22 +277,7 @@ public class PartitioningTests
assertTrue(NoSuchUserException); assertTrue(NoSuchUserException);
} }
// username is NULL
@Test public void NoSuchUserException3() throws NoSuchUserException, AlreadyLoggedInException, IncorrectPassphraseException, WeakPassphraseException, DuplicateUserException {
boolean NoSuchUserException = false;
String passbookUsername = "AlexTina";
String passbookphrase = "Abc234hg";
String passbookUsername2 = "";
String passbookphrase2 = "Abc234hg";
try {
pb.addUser(passbookUsername,passbookphrase);
pb.loginUser(passbookUsername2,passbookphrase2);
}
catch (NoSuchUserException e){
NoSuchUserException = true;
}
assertTrue(NoSuchUserException);
}
// user has login // user has login
@Test public void AlreadyLoggedInException() throws NoSuchUserException, IncorrectPassphraseException, WeakPassphraseException, DuplicateUserException { @Test public void AlreadyLoggedInException() throws NoSuchUserException, IncorrectPassphraseException, WeakPassphraseException, DuplicateUserException {
boolean AlreadyLoggedInException = false; boolean AlreadyLoggedInException = false;
...@@ -364,22 +349,7 @@ public class PartitioningTests ...@@ -364,22 +349,7 @@ public class PartitioningTests
} }
assertFalse(IncorrectPassphraseException); assertFalse(IncorrectPassphraseException);
} }
//passphrase is NULL
@Test public void IncorrectPassphraseException3() throws WeakPassphraseException, DuplicateUserException, AlreadyLoggedInException, IncorrectPassphraseException, NoSuchUserException {
boolean IncorrectPassphraseException = false;
String passbookUsername = "AlexTina";
String passbookphrase = "Abc234hg";
String passbookUsername2 = "AlexTina";
String passbookphrase2 = "";
try {
pb.addUser(passbookUsername,passbookphrase);
pb.loginUser(passbookUsername2,passbookphrase2);
}
catch (IncorrectPassphraseException e){
IncorrectPassphraseException = true;
}
assertTrue(IncorrectPassphraseException);
}
//------------------------------updateDetails Test Cases------------------------------------- //------------------------------updateDetails Test Cases-------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment