Esempio n. 1
0
 @Test
 public void testIdList() {
   MassImportForm massImportForm = new MassImportForm();
   assertNotNull(massImportForm);
   String fixture = "test";
   massImportForm.setIdList(fixture);
   assertEquals("test", massImportForm.getIdList());
 }
Esempio n. 2
0
  @Test
  public void testConvertWithFileId() throws FileNotFoundException {

    MassImportForm massImportForm = new MassImportForm();
    assertNotNull(massImportForm);
    massImportForm.setTemplate(template);
    massImportForm.setIdList("junit");

    massImportForm.setCurrentPlugin("JunitImportPlugin");
    String fixture = massImportForm.convertData();
    assertEquals("process_import_3", fixture);
  }
Esempio n. 3
0
  @Test
  public void testGetNextPage() {
    MassImportForm massImportForm = new MassImportForm();
    assertNotNull(massImportForm);
    massImportForm.setTemplate(template);
    massImportForm.setCurrentPlugin("JunitImportPlugin");
    String fixture = massImportForm.nextPage();
    assertEquals("", fixture);

    massImportForm.setIdList("junit");
    fixture = massImportForm.nextPage();
    assertEquals("process_import_2", fixture);

    massImportForm.setCurrentPlugin("JunitImportPluginWithSecondPage");
    fixture = massImportForm.nextPage();
    assertEquals("process_import_2_mass", fixture);
  }