use of org.opendatakit.briefcase.reused.job.TestRunnerStatus in project briefcase by opendatakit.
the class PullFromAggregateIntegrationTest method setUp.
@Before
public void setUp() throws IOException {
Files.createDirectories(briefcaseDir);
prefs = new BriefcasePreferences(InMemoryPreferences.empty());
prefs.setStorageDir(tmpDir);
server = httpServer(serverPort);
tracker = new PullFromAggregateTracker(form, e -> {
});
formMetadataPort = new InMemoryFormMetadataAdapter();
pullOp = new PullFromAggregate(CommonsHttp.of(1), aggregateServer, briefcaseDir, true, e -> {
}, formMetadataPort);
runnerStatus = new TestRunnerStatus(false);
}
use of org.opendatakit.briefcase.reused.job.TestRunnerStatus in project briefcase by opendatakit.
the class PushToCentralTest method setUp.
@Before
public void setUp() throws IOException {
http = new FakeHttp();
briefcaseDir = createTempDirectory("briefcase-test-");
pushOp = new PushToCentral(http, server, briefcaseDir, token, this::onEvent);
events = new ArrayList<>();
runnerStatus = new TestRunnerStatus(false);
tracker = new PushToCentralTracker(formStatus, this::onEvent);
form = installForm(formStatus, getResourcePath("/org/opendatakit/briefcase/push/aggregate/push-form-test.xml"), briefcaseDir);
formAttachment = installFormAttachment(formStatus, getResourcePath("/org/opendatakit/briefcase/push/aggregate/sparrow.png"), briefcaseDir);
submission = installSubmission(formStatus, getResourcePath("/org/opendatakit/briefcase/push/aggregate/submission.xml"), briefcaseDir);
submissionAttachment = installSubmissionAttachment(formStatus, getResourcePath("/org/opendatakit/briefcase/push/aggregate/1556532531101.jpg"), briefcaseDir, instanceId);
formMetadataPort = new InMemoryFormMetadataAdapter();
FormKey key = FormKey.from(formStatus);
FormMetadata metadata = FormMetadata.of(key, formStatus.getFormDir(briefcaseDir), briefcaseDir);
formMetadataPort.persist(metadata);
}
use of org.opendatakit.briefcase.reused.job.TestRunnerStatus in project briefcase by opendatakit.
the class PullFromAggregateTest method init.
@Before
public void init() throws IOException {
Files.createDirectories(briefcaseDir);
prefs = new BriefcasePreferences(InMemoryPreferences.empty());
prefs.setStorageDir(tmpDir);
http = new FakeHttp();
events = new ArrayList<>();
tracker = new PullFromAggregateTracker(form, e -> events.add(e.getStatusString()));
pullOp = new PullFromAggregate(http, server, briefcaseDir, includeIncomplete, e -> {
}, new InMemoryFormMetadataAdapter());
runnerStatus = new TestRunnerStatus(false);
}
use of org.opendatakit.briefcase.reused.job.TestRunnerStatus in project briefcase by opendatakit.
the class PushToAggregateTest method setUp.
@Before
public void setUp() throws IOException {
http = new FakeHttp();
briefcaseDir = createTempDirectory("briefcase-test-");
events = new ArrayList<>();
runnerStatus = new TestRunnerStatus(false);
tracker = new PushToAggregateTracker(formStatus, this::onEvent);
form = TransferTestHelpers.installForm(formStatus, TransferTestHelpers.getResourcePath("/org/opendatakit/briefcase/push/aggregate/push-form-test.xml"), briefcaseDir);
formAttachment = TransferTestHelpers.installFormAttachment(formStatus, TransferTestHelpers.getResourcePath("/org/opendatakit/briefcase/push/aggregate/sparrow.png"), briefcaseDir);
submission = TransferTestHelpers.installSubmission(formStatus, TransferTestHelpers.getResourcePath("/org/opendatakit/briefcase/push/aggregate/submission.xml"), briefcaseDir);
submissionAttachment = TransferTestHelpers.installSubmissionAttachment(formStatus, TransferTestHelpers.getResourcePath("/org/opendatakit/briefcase/push/aggregate/1556532531101.jpg"), briefcaseDir, instanceId);
}
use of org.opendatakit.briefcase.reused.job.TestRunnerStatus in project briefcase by opendatakit.
the class PullFromCentralTest method init.
@Before
public void init() {
http = new FakeHttp();
events = new ArrayList<>();
tracker = new PullFromCentralTracker(form, e -> events.add(e.getStatusString()));
pullOp = new PullFromCentral(http, server, briefcaseDir, token, e -> {
}, new InMemoryFormMetadataAdapter());
runnerStatus = new TestRunnerStatus(false);
}
Aggregations