Skip to content
Snippets Groups Projects
Commit 42aeabdf authored by alec.schmidt's avatar alec.schmidt
Browse files

test 4

parent 5580a753
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ public class AppTest ...@@ -37,7 +37,7 @@ public class AppTest
* Test 01 : Testing the correct appending of a contact in the controller * Test 01 : Testing the correct appending of a contact in the controller
*/ */
@Test @Test
public void addContact() { public void testAddContact() {
List<Contact> array = new ArrayList<Contact>(); List<Contact> array = new ArrayList<Contact>();
...@@ -53,7 +53,7 @@ public class AppTest ...@@ -53,7 +53,7 @@ public class AppTest
* Test 02 : Serialize and deserialize the data * Test 02 : Serialize and deserialize the data
*/ */
@Test @Test
public void serializeData() { public void testSerializeData() {
String folderTestPath = "./folderTest"; String folderTestPath = "./folderTest";
File f = new File(folderTestPath); File f = new File(folderTestPath);
...@@ -75,7 +75,7 @@ public class AppTest ...@@ -75,7 +75,7 @@ public class AppTest
} }
/** /**
* Test 03 : * Test 03 : Test the search function for a hit and a miss
*/ */
@Test @Test
public void testSearch() { public void testSearch() {
...@@ -85,4 +85,15 @@ public class AppTest ...@@ -85,4 +85,15 @@ public class AppTest
assertEquals(found.getList().toString(), controller.getList().toString()); assertEquals(found.getList().toString(), controller.getList().toString());
assertNotSame(notFound.getList().toString(), controller.getList().toString()); assertNotSame(notFound.getList().toString(), controller.getList().toString());
} }
/**
* Test 04 :
*/
@Test
public void testRemoveContact() {
List<Contact> emtpyArray = new ArrayList<Contact>();
controller.removeContact(c);
assertEquals(emtpyArray, controller.getList());
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment