use of org.apache.samza.context.ApplicationTaskContextFactory in project samza by apache.
the class TestStreamApplicationDescriptorImpl method testApplicationTaskContextFactory.
@Test
public void testApplicationTaskContextFactory() {
ApplicationTaskContextFactory factory = mock(ApplicationTaskContextFactory.class);
StreamApplication testApp = appDesc -> appDesc.withApplicationTaskContextFactory(factory);
StreamApplicationDescriptorImpl appSpec = new StreamApplicationDescriptorImpl(testApp, getConfig());
assertEquals(appSpec.getApplicationTaskContextFactory(), Optional.of(factory));
}
use of org.apache.samza.context.ApplicationTaskContextFactory in project samza by apache.
the class TestTaskApplicationDescriptorImpl method testApplicationTaskContextFactory.
@Test
public void testApplicationTaskContextFactory() {
ApplicationTaskContextFactory factory = mock(ApplicationTaskContextFactory.class);
TaskApplication testApp = appDesc -> appDesc.withApplicationTaskContextFactory(factory);
TaskApplicationDescriptorImpl appSpec = new TaskApplicationDescriptorImpl(testApp, mock(Config.class));
assertEquals(appSpec.getApplicationTaskContextFactory(), Optional.of(factory));
}
Aggregations