/** Test of getUsers method, of class Project. */ @Test public void testGetUsers() { try { System.out.println("getUsers"); Project instance = new Project(); instance.addUser("Jannie"); Object[] result = instance.getUsers(); if (!result[0].equals("Jannie")) fail("GetUsers(), test failed values not correct"); } catch (Exception e) { fail("GetUsers(), test failed"); } }
/** Test of getUsersNotOnProject method, of class Project. */ @Test public void testGetUsersNotOnProject() { try { System.out.println("getUsersNotOnProject"); Reference.usernames.add(new User("j", "j", "j", "j")); Reference.usernames.add(new User("k", "k", "k", "k")); Project instance = new Project(); instance.addUser("j"); String[] result = instance.getUsersNotOnProject(); System.out.println(result[0]); for (int i = 0; i < result.length; i++) { if (result[i].equals("j")) fail("GetUsersNotOnProject(), value incorrect"); } } catch (Exception e) { fail("GetUsersNotOnProject(), exception"); } }