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

add one boundary test

parent 17f87efd
No related branches found
No related tags found
No related merge requests found
Pipeline #5661 passed
...@@ -14,6 +14,31 @@ import static org.junit.Assert.*; ...@@ -14,6 +14,31 @@ import static org.junit.Assert.*;
public class BoundaryTests public class BoundaryTests
extends PartitioningTests extends PartitioningTests
{ {
@Test public void WeakPassphraseException() throws DuplicateUserException {
boolean WeakPassphraseException = false;
String passbookUsername = "AlexTina";
String passbookphrase = "123Abcde";
try{
pb.addUser(passbookUsername,passbookphrase);
}catch(WeakPassphraseException e){
WeakPassphraseException = true;
}
assertFalse(WeakPassphraseException);
}
//Test on point 7
@Test public void WeakPassphraseException2() throws DuplicateUserException {
boolean WeakPassphraseException = false;
String passbookUsername = "AlexTina";
String passbookphrase = "123ABCd";
try{
pb.addUser(passbookUsername,passbookphrase);
}catch(WeakPassphraseException e){
WeakPassphraseException = true;
}
assertTrue(WeakPassphraseException);
}
//Add another test //Add another test
@Test public void anotherTEst() @Test public void anotherTEst()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment