@Test public void testGetUserListAsObject() { Object[][] arr = ds.getUserListAsObject(); assertNotNull(arr); assertEquals(arr.length, ds.getUserList().size()); assertEquals(3, arr[0].length); }
public Object[][] getUserListAsObject() { int listSize = userList != null ? userList.size() : 0; Object[][] userArray = new Object[listSize][3]; if (userList != null) { int i = 0; for (IUser u : userList) { userArray[i][0] = u.getId(); userArray[i][1] = u.getName(); userArray[i][2] = u.getFirstName(); i++; } } return userArray; }
DataSet { public Object[][] getUserListAsObject() { int listSize = userList != null ? userList.size() : 0; Object[][] userArray = new Object[listSize][3]; if (userList != null) { int i = 0; for (IUser u : userList) { userArray[i][0] = u.getId(); userArray[i][1] = u.getName(); userArray[i][2] = u.getFirstName(); i++; } } return userArray; } }
DataSet { public Object[][] getUserListAsObject() { int listSize = userList != null ? userList.size() : 0; Object[][] userArray = new Object[listSize][3]; if (userList != null) { int i = 0; for (IUser u : userList) { userArray[i][0] = u.getId(); userArray[i][1] = u.getName(); userArray[i][2] = u.getFirstName(); i++; } } return userArray; } DataSet(DateFormat dateFormat); }
DataSet { public Object[][] getUserListAsObject() { int listSize = userList != null ? userList.size() : 0; Object[][] userArray = new Object[listSize][3]; if (userList != null) { int i = 0; for (IUser u : userList) { userArray[i][0] = u.getId(); userArray[i][1] = u.getName(); userArray[i][2] = u.getFirstName(); i++; } } return userArray; } DataSet(DateFormat dateFormat); List<IUser> getUserList(); IUser getUserById(int id); IUser getUserByName(String name); void updateRentalsWithUser(User user); Object[][] getUserListAsObject(); List<Movie> getMovieList(); Object[][] getMovieListAsObject(boolean rented, boolean available); Movie getMovieById(long id); void updateMovie(Movie movie); Object[][] getMovieListAsObject(); List<Rental> getRentalList(); Object[][] getRentalListAsObject(); @Override int hashCode(); @Override boolean equals(Object obj); }
DataSet { public Object[][] getUserListAsObject() { int listSize = userList != null ? userList.size() : 0; Object[][] userArray = new Object[listSize][3]; if (userList != null) { int i = 0; for (IUser u : userList) { userArray[i][0] = u.getId(); userArray[i][1] = u.getName(); userArray[i][2] = u.getFirstName(); i++; } } return userArray; } DataSet(DateFormat dateFormat); List<IUser> getUserList(); IUser getUserById(int id); IUser getUserByName(String name); void updateRentalsWithUser(User user); Object[][] getUserListAsObject(); List<Movie> getMovieList(); Object[][] getMovieListAsObject(boolean rented, boolean available); Movie getMovieById(long id); void updateMovie(Movie movie); Object[][] getMovieListAsObject(); List<Rental> getRentalList(); Object[][] getRentalListAsObject(); @Override int hashCode(); @Override boolean equals(Object obj);  }