Search in sources :

Example 6 with ExportForms

use of org.opendatakit.briefcase.export.ExportForms in project briefcase by opendatakit.

the class FormsTableUnitTest method can_clear_selection_of_forms.

@Test
public void can_clear_selection_of_forms() {
    ExportForms forms = new ExportForms(buildFormStatusList(10), ExportConfiguration.empty(), new HashMap<>(), new HashMap<>(), new HashMap<>());
    TestFormsTableViewModel viewModel = new TestFormsTableViewModel(forms);
    FormsTable formsTable = new FormsTable(forms, new TestFormsTableView(viewModel), viewModel);
    formsTable.selectAll();
    formsTable.clearAll();
    assertThat(forms.noneSelected(), Matchers.is(true));
}
Also used : ExportForms(org.opendatakit.briefcase.export.ExportForms) Test(org.junit.Test)

Example 7 with ExportForms

use of org.opendatakit.briefcase.export.ExportForms in project briefcase by opendatakit.

the class FormsTableUnitTest method can_select_all_forms.

@Test
public void can_select_all_forms() {
    ExportForms forms = new ExportForms(buildFormStatusList(10), ExportConfiguration.empty(), new HashMap<>(), new HashMap<>(), new HashMap<>());
    TestFormsTableViewModel viewModel = new TestFormsTableViewModel(forms);
    FormsTable formsTable = new FormsTable(forms, new TestFormsTableView(viewModel), viewModel);
    assertThat(forms.noneSelected(), Matchers.is(true));
    formsTable.selectAll();
    assertThat(forms.allSelected(), Matchers.is(true));
}
Also used : ExportForms(org.opendatakit.briefcase.export.ExportForms) Test(org.junit.Test)

Aggregations

ExportForms (org.opendatakit.briefcase.export.ExportForms)7 Test (org.junit.Test)6 ConfigurationPanel (org.opendatakit.briefcase.ui.export.components.ConfigurationPanel)4 BriefcasePreferences (org.opendatakit.briefcase.model.BriefcasePreferences)3 FormStatus (org.opendatakit.briefcase.model.FormStatus)3 TerminationFuture (org.opendatakit.briefcase.model.TerminationFuture)3 NoOpAnalytics (org.opendatakit.briefcase.ui.reused.NoOpAnalytics)3 ExportConfiguration (org.opendatakit.briefcase.export.ExportConfiguration)2 Ignore (org.junit.Ignore)1 BriefcaseFormDefinition (org.opendatakit.briefcase.model.BriefcaseFormDefinition)1 ExportFailedEvent (org.opendatakit.briefcase.model.ExportFailedEvent)1 ExportProgressEvent (org.opendatakit.briefcase.model.ExportProgressEvent)1 ExportSucceededEvent (org.opendatakit.briefcase.model.ExportSucceededEvent)1 ExportSucceededWithErrorsEvent (org.opendatakit.briefcase.model.ExportSucceededWithErrorsEvent)1 FormStatusBuilder.buildFormStatus (org.opendatakit.briefcase.model.FormStatusBuilder.buildFormStatus)1