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

unit test refactor

parent 42aeabdf
No related branches found
No related tags found
No related merge requests found
...@@ -39,14 +39,10 @@ public class AppTest ...@@ -39,14 +39,10 @@ public class AppTest
@Test @Test
public void testAddContact() { public void testAddContact() {
List<Contact> array = new ArrayList<Contact>();
ContactController controllerTest = new ContactController(); ContactController controllerTest = new ContactController();
array.add(c);
controllerTest.append(c); controllerTest.append(c);
assertEquals(controllerTest.getList(), array); assertEquals(controllerTest.getList(), controller.getList());
} }
/* /*
...@@ -82,12 +78,12 @@ public class AppTest ...@@ -82,12 +78,12 @@ public class AppTest
ContactController found = controller.search("Testing"); ContactController found = controller.search("Testing");
ContactController notFound = controller.search("Phony"); ContactController notFound = controller.search("Phony");
assertEquals(found.getList().toString(), controller.getList().toString()); assertEquals(found.getList(), controller.getList());
assertNotSame(notFound.getList().toString(), controller.getList().toString()); assertNotSame(notFound.getList(), controller.getList());
} }
/** /**
* Test 04 : * Test 04 : Testing the correct removal of a contact in a controller
*/ */
@Test @Test
public void testRemoveContact() { public void testRemoveContact() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment