Пример #1
0
 @Test
 public void testAddProject() {
   int lastIndex = s.getNumberOfPreferences() - 1;
   s.addProject(testProject_1);
   assertEquals(
       "expected addProject to append object at the end of the array.",
       lastIndex + 1,
       s.getProjects().indexOf(testProject_1));
   for (Project project : testProject_rest) {
     s.addProject(project);
   }
   assertEquals(
       "expect to add %d projects.", testProject_rest.size() + 1, s.getNumberOfPreferences());
 }
Пример #2
0
 @Test
 public void testGetNumberOfPreferences() throws Exception {
   assertEquals("should equal", testProject_rest.size(), preped_s.getNumberOfPreferences());
 }