From dc3052172684495ee73fbd3c830b94d9e01003c6 Mon Sep 17 00:00:00 2001
From: Lin Fan <fanl4@student.unimelb.edu.au>
Date: Thu, 5 Sep 2019 19:19:17 +1000
Subject: [PATCH] Update BoundaryTests.java
---
.../swen90006/passbook/BoundaryTests.java | 94 +++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/tests/Boundary/swen90006/passbook/BoundaryTests.java b/tests/Boundary/swen90006/passbook/BoundaryTests.java
index cba90f1..c56b6a9 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");
+ }
}
--
GitLab