Search in sources :

Example 1 with BackendProviderService

use of io.cucumber.core.backend.BackendProviderService in project cucumber-jvm by cucumber.

the class BackendServiceLoader method loadBackends.

private Collection<? extends Backend> loadBackends(Iterable<BackendProviderService> serviceLoader) {
    List<Backend> backends = new ArrayList<>();
    for (BackendProviderService backendProviderService : serviceLoader) {
        ObjectFactory objectFactory = objectFactorySupplier.get();
        backends.add(backendProviderService.create(objectFactory, objectFactory, classLoaderSupplier));
    }
    return backends;
}
Also used : Backend(io.cucumber.core.backend.Backend) ObjectFactory(io.cucumber.core.backend.ObjectFactory) ArrayList(java.util.ArrayList) BackendProviderService(io.cucumber.core.backend.BackendProviderService)

Example 2 with BackendProviderService

use of io.cucumber.core.backend.BackendProviderService in project cucumber-jvm by cucumber.

the class GuiceBackendTest method backend_service_creates_backend.

@Test
void backend_service_creates_backend() {
    BackendProviderService backendProviderService = new GuiceBackendProviderService();
    assertThat(backendProviderService.create(factory, factory, classLoader), is(notNullValue()));
}
Also used : BackendProviderService(io.cucumber.core.backend.BackendProviderService) Test(org.junit.jupiter.api.Test)

Aggregations

BackendProviderService (io.cucumber.core.backend.BackendProviderService)2 Backend (io.cucumber.core.backend.Backend)1 ObjectFactory (io.cucumber.core.backend.ObjectFactory)1 ArrayList (java.util.ArrayList)1 Test (org.junit.jupiter.api.Test)1