diff --git a/tests/Boundary/swen90006/passbook/BoundaryTests.java b/tests/Boundary/swen90006/passbook/BoundaryTests.java index cba90f1b376eeb0774a97a4924ea43d16f0dba39..c56b6a9f246c8f55e064d1fca13273b5b6b57e43 100644 --- a/tests/Boundary/swen90006/passbook/BoundaryTests.java +++ b/tests/Boundary/swen90006/passbook/BoundaryTests.java @@ -22,4 +22,98 @@ public class BoundaryTests final int actual = 2; assertEquals("Some failure message", expected, actual); } + @Test(expected = WeakPassphraseException.class) + public void addUserEC2Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsername2", "Abbb123"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC2Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsername2", ""); + } + @Test + public void addUserEC3Onpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsername3", "AAaa00000"); + assertTrue(pb.isUser("passbookUsername3")); + + } + @Test + public void addUserEC3Onpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsername3", "ZZzz99999"); + assertTrue(pb.isUser("passbookUsername3")); + + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC3Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "``//////@@"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC3Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "{{::::::[[["); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC4Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "@@`````0000"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC4Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "[[[{{{{{{999999"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC5Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "@@/////aaaaa"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC5Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "[[[[:::::::zz"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC6Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "````///////AA"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC6Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "{{{{{::::::ZZ"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC7Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "``AAAAA000"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC7Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "{{{ZZZZ9999"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC8Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "@aaaaa000"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC8Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "[[[zzzzz9999"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC9Offpoint1Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "aaa///AAAA"); + } + @Test(expected = WeakPassphraseException.class) + public void addUserEC9Offpoint2Test()throws DuplicateUserException, WeakPassphraseException + { + pb.addUser("passbookUsernamee", "zzz::::::ZZZ"); + } }