@Test public void example_1_projects_can_be_imported() throws Exception { File file = DeveloperToolsTestFileSupport.getTestfileSupport().createFileFromResourcePath("csv/example1-developer-admin-ui_mass-import_projects.csv"); importerToTest.importProjectsAndRelationsByCSV(file); for (int i=1;i<=15;i++) { verify(administration,times(1)).createProject(eq("testproject_"+i),eq("Project testproject_"+i),eq("scenario2_owner1"),eq(Collections.emptyList())); } verify(administration).assignUserToProject("scenario2_user1", "testproject_1"); verify(administration).assignUserToProject("scenario2_user2", "testproject_2"); verify(administration,never()).assignUserToProject("scenario2_user1", "testproject_2"); verify(administration).assignUserToProject("scenario2_user1", "testproject_3"); verify(administration).assignUserToProject("scenario2_user2", "testproject_3"); }
public void importProjectsAndRelationsByCSV(File file) throws IOException { List<CSVRow> rows = csvImporter.importCSVFile(file, 3, 1); for (CSVRow row: rows) { importRow(row); } }
CreateProjectMassCSVImporter { public void importProjectsAndRelationsByCSV(File file) throws IOException { List<CSVRow> rows = csvImporter.importCSVFile(file, 3, 1); for (CSVRow row: rows) { importRow(row); } } }
CreateProjectMassCSVImporter { public void importProjectsAndRelationsByCSV(File file) throws IOException { List<CSVRow> rows = csvImporter.importCSVFile(file, 3, 1); for (CSVRow row: rows) { importRow(row); } } CreateProjectMassCSVImporter(DeveloperAdministration administration); }
CreateProjectMassCSVImporter { public void importProjectsAndRelationsByCSV(File file) throws IOException { List<CSVRow> rows = csvImporter.importCSVFile(file, 3, 1); for (CSVRow row: rows) { importRow(row); } } CreateProjectMassCSVImporter(DeveloperAdministration administration); void importProjectsAndRelationsByCSV(File file); }
CreateProjectMassCSVImporter { public void importProjectsAndRelationsByCSV(File file) throws IOException { List<CSVRow> rows = csvImporter.importCSVFile(file, 3, 1); for (CSVRow row: rows) { importRow(row); } } CreateProjectMassCSVImporter(DeveloperAdministration administration); void importProjectsAndRelationsByCSV(File file);  }