BaseGenerator implements Generator { protected String getRegistry() { if (!RuntimeMode.isOpenShiftMode(getProject().getProperties())) { return getConfigWithFallback(Config.registry, FABRIC8_GENERATOR_REGISTRY, null); } return null; } BaseGenerator(GeneratorContext context, String name);  BaseGenerator(GeneratorContext context, String name, FromSelector selector); String getName(); GeneratorContext getContext();  }
@Test public void getRegistry() { Properties props = new Properties(); props.put("fabric8.generator.registry", "fabric8.io"); setupContextKubernetes(props, null, null); BaseGenerator generator = createGenerator(null); assertEquals("fabric8.io", generator.getRegistry()); }
@Test public void getRegistryInOpenshift() { Properties props = new Properties(); props.put("fabric8.generator.registry", "fabric8.io"); props.put(RuntimeMode.FABRIC8_EFFECTIVE_PLATFORM_MODE, "openshift"); setupContextOpenShift(props, null, null); BaseGenerator generator = createGenerator(null); assertNull(generator.getRegistry()); }