Fabric8ServiceHub { public BuildService getBuildService() { return (BuildService) this.services.get(BuildService.class).get(); } private  Fabric8ServiceHub(); BuildService getBuildService(); ArtifactResolverService getArtifactResolverService();  }
@Test public void testObtainDockerBuildService() { Fabric8ServiceHub hub = new Fabric8ServiceHub.Builder() .clusterAccess(clusterAccess) .log(logger) .platformMode(RuntimeMode.kubernetes) .dockerServiceHub(dockerServiceHub) .buildServiceConfig(buildServiceConfig) .build(); BuildService buildService = hub.getBuildService(); assertNotNull(buildService); assertTrue(buildService instanceof DockerBuildService); }
@Test public void testObtainJibBuildService() { isJib = true; Fabric8ServiceHub hub = new Fabric8ServiceHub.Builder() .clusterAccess(clusterAccess) .log(logger) .platformMode(RuntimeMode.kubernetes) .dockerServiceHub(dockerServiceHub) .buildServiceConfig(buildServiceConfig) .isJibMode(isJib) .build(); BuildService buildService = hub.getBuildService(); assertNotNull(buildService); assertTrue(buildService instanceof JibBuildService); }
@Test public void testObtainOpenshiftBuildService() { Fabric8ServiceHub hub = new Fabric8ServiceHub.Builder() .clusterAccess(clusterAccess) .log(logger) .platformMode(RuntimeMode.openshift) .dockerServiceHub(dockerServiceHub) .buildServiceConfig(buildServiceConfig) .build(); BuildService buildService = hub.getBuildService(); assertNotNull(buildService); assertTrue(buildService instanceof OpenshiftBuildService); }