From d8bd33bd9ef555553a69ee50368149b8edaecc23 Mon Sep 17 00:00:00 2001
From: CONGRANLI <907112284@qq.com>
Date: Fri, 6 Sep 2019 02:39:19 +1000
Subject: [PATCH] delete the NULL
---
.../swen90006/passbook/BoundaryTests.java | 11 ++++--
.../swen90006/passbook/PartitioningTests.java | 36 ++-----------------
2 files changed, 12 insertions(+), 35 deletions(-)
diff --git a/tests/Boundary/swen90006/passbook/BoundaryTests.java b/tests/Boundary/swen90006/passbook/BoundaryTests.java
index fb9482b..2109c80 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 c8c82c6..c581067 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-------------------------------------
--
GitLab