Skip to content
Snippets Groups Projects
Commit 6be0c644 authored by Tian Jinxin's avatar Tian Jinxin
Browse files

Update BoundaryTests.java

parent 037ccad3
No related branches found
No related tags found
No related merge requests found
Pipeline #5276 failed
...@@ -14,12 +14,83 @@ import static org.junit.Assert.*; ...@@ -14,12 +14,83 @@ import static org.junit.Assert.*;
public class BoundaryTests public class BoundaryTests
extends PartitioningTests extends PartitioningTests
{ {
//Add another test
@Test public void anotherTEst()
//Test1
@Test public void test1() throws DuplicateUserException, WeakPassphraseException
{
pb.addUser("Sam","123456aA");
assertTrue(pb.isUser("Sam"));
}
//Test2
@Test
public void Test2()throws DuplicateUserException, WeakPassphraseException
{
pb.addUser("Tom","123456aA");
assertTrue(pb.isUser("Tom"));
}
//Test3
@Test
public void Test23()throws DuplicateUserException, WeakPassphraseException
{
pb.addUser("Sammy","123213aAD");
assertTrue(pb.isUser("Sammy"));
}
//Test4
@Test
public void Test4()throws DuplicateUserException, WeakPassphraseException
{
pb.addUser("Hus","6786HKJs");
assertTrue(pb.isUser("Hus"));
}
//Test5
@Test
public void Test5()throws DuplicateUserException, WeakPassphraseException
{
pb.addUser("Sarry","254hjkH");
assertTrue(pb.isUser("Sarry"));
}
//Test6
@Test
public void Test26()throws DuplicateUserException, WeakPassphraseException
{ {
//include a message for better feedback pb.addUser("Ken","242gfdA");
final int expected = 2; assertTrue(pb.isUser("Ken"));
final int actual = 2;
assertEquals("Some failure message", expected, actual);
} }
//Test7
@Test
public void Test7()throws DuplicateUserException, WeakPassphraseException
{
pb.addUser("Dom","78978hkJ");
assertTrue(pb.isUser("Dom"));
}
//Test8
@Test
public void Test8()throws DuplicateUserException, WeakPassphraseException
{
pb.addUser("Koll","123hkjHH");
assertTrue(pb.isUser("Koll"));
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment