From d5e5e2a834a2f6766faa6f552fa85c86c2d17f79 Mon Sep 17 00:00:00 2001
From: Tian Jinxin <jinxin.tian@student.unimelb.edu.au>
Date: Thu, 5 Sep 2019 21:29:21 +1000
Subject: [PATCH] Update BoundaryTests.java

---
 .../swen90006/passbook/BoundaryTests.java     | 146 ++++++++++--------
 1 file changed, 85 insertions(+), 61 deletions(-)

diff --git a/tests/Boundary/swen90006/passbook/BoundaryTests.java b/tests/Boundary/swen90006/passbook/BoundaryTests.java
index 326973f..cb4a3bd 100644
--- a/tests/Boundary/swen90006/passbook/BoundaryTests.java
+++ b/tests/Boundary/swen90006/passbook/BoundaryTests.java
@@ -14,83 +14,107 @@ import static org.junit.Assert.*;
 public class BoundaryTests
     extends PartitioningTests
 {
-	
-	
-	
-  //Test1 
-    @Test public void test1() throws DuplicateUserException, WeakPassphraseException
+    //Add another test
+    @Test public void anotherTEst()
     {
-
-
-			pb.addUser("Sam","123456aA");
-			assertTrue(pb.isUser("Sam"));
-
+	//include a message for better feedback
+	final int expected = 2;
+	final int actual = 2;
+	assertEquals("Some failure message", expected, actual);
     }
-    
-    
-  //Test2
-    @Test
-    public void Test2()throws DuplicateUserException, WeakPassphraseException
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC2Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
     {
-    	pb.addUser("Tom","123456aA");
-    	assertTrue(pb.isUser("Tom"));
+    	pb.addUser("Sam12345", " Sam1234");
     }
-    
-    
-  //Test3 
-    @Test
-    public void Test23()throws DuplicateUserException, WeakPassphraseException
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC2Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
     {
-    	pb.addUser("Sammy","123213aAD");
-    	assertTrue(pb.isUser("Sammy"));
+    	pb.addUser("Sam123456", "");
     }
-    
-    
-  //Test4 
     @Test
-    public void Test4()throws DuplicateUserException, WeakPassphraseException
+    public void addUserEC3Onpoint1Test()throws DuplicateUserException, WeakPassphraseException
     {
-    	pb.addUser("Hus","6786HKJs");
-    	assertTrue(pb.isUser("Hus"));
+    	pb.addUser("Sam1234", " Sam12345");
+    	assertTrue(pb.isUser("Sam1234"));
+
     }
-    
-  //Test5
     @Test
-    public void Test5()throws DuplicateUserException, WeakPassphraseException
+    public void addUserEC3Onpoint2Test()throws DuplicateUserException, WeakPassphraseException
     {
-    	pb.addUser("Sarry","254hjkH");
-    	assertTrue(pb.isUser("Sarry"));
-    }
+    	pb.addUser("Sam1234", " Sam12345");
+    	assertTrue(pb.isUser("Sam1234"));
 
-    
-    
-  //Test6
-    @Test
-    public void Test26()throws DuplicateUserException, WeakPassphraseException
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC3Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
     {
-    	pb.addUser("Ken","242gfdA");
-    	assertTrue(pb.isUser("Ken"));
+    	pb.addUser("Sam123", "!!!!!!!!");
     }
-    
-    
-    
-  //Test7
-    @Test
-    public void Test7()throws DuplicateUserException, WeakPassphraseException
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC3Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
     {
-    	pb.addUser("Dom","78978hkJ");
-    	assertTrue(pb.isUser("Dom"));
+    	pb.addUser("Sam123", "!!!!!!!!");
     }
-    
-    
-    
-  //Test8
-    @Test
-    public void Test8()throws DuplicateUserException, WeakPassphraseException
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC4Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
     {
-    	pb.addUser("Koll","123hkjHH");
-    	assertTrue(pb.isUser("Koll"));
+    	pb.addUser("Sam123", "!!@@@@@@@");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC4Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "!!!!@34455");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC5Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "13142!!aaaaa");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC5Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "!!!@@@#334");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC6Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "!!!@@##$$Ed");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC6Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "!!!@@@@#sss");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC7Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "``AAAAA000");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC7Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "!!!!ewfa32323");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC8Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "@aaa435345");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC8Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "314124124AA!");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC9Offpoint1Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "aaa123!AAAA");
+    }
+    @Test(expected = WeakPassphraseException.class) 
+    public void addUserEC9Offpoint2Test()throws DuplicateUserException, WeakPassphraseException
+    {
+    	pb.addUser("Sam123", "z!!sdfsd:ZZZ");
     }
-
-    
 }
+
-- 
GitLab