diff --git a/tests/Boundary/swen90006/passbook/BoundaryTests.java b/tests/Boundary/swen90006/passbook/BoundaryTests.java index fb9482b716356f6ffac97c89b1e4904710acd41d..2109c80f45f71f1c4e3f7c322020d02831915fbb 100755 --- a/tests/Boundary/swen90006/passbook/BoundaryTests.java +++ b/tests/Boundary/swen90006/passbook/BoundaryTests.java @@ -41,9 +41,16 @@ public class BoundaryTests assertFalse(WeakPassphraseException); } - @Test public void ASCII() { + @Test public void Contains3() throws DuplicateUserException { boolean WeakPassphraseException = false; - + String passbookUsername = "AlexTina"; + String passbookphrase = "'{@[/:Cd"; + try { + pb.addUser(passbookUsername, passbookphrase); + }catch(WeakPassphraseException e) { + WeakPassphraseException = true; + } + assertTrue(WeakPassphraseException); } diff --git a/tests/Partitioning/swen90006/passbook/PartitioningTests.java b/tests/Partitioning/swen90006/passbook/PartitioningTests.java index c8c82c6014078a632b892e24c9768b062a8fd04e..c581067e47cb0f90dfa0034977a826298982d6a0 100755 --- a/tests/Partitioning/swen90006/passbook/PartitioningTests.java +++ b/tests/Partitioning/swen90006/passbook/PartitioningTests.java @@ -152,7 +152,7 @@ public class PartitioningTests { boolean WeakPassphraseException = false; String passbookUsername = "AlexTina"; - String passbookphrase = "^&*($%@#"; + String passbookphrase = "'{@[/:Cd"; try{ pb.addUser(passbookUsername,passbookphrase); } @@ -277,22 +277,7 @@ public class PartitioningTests 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 @Test public void AlreadyLoggedInException() throws NoSuchUserException, IncorrectPassphraseException, WeakPassphraseException, DuplicateUserException { boolean AlreadyLoggedInException = false; @@ -364,22 +349,7 @@ public class PartitioningTests } 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-------------------------------------