Search in sources :

Example 1 with KeyValuePropertySource

use of org.jboss.tools.openshift.internal.ui.property.KeyValuePropertySource in project jbosstools-openshift by jbosstools.

the class BuildConfigPropertySourceTest method getCustomPropertyValues.

@Test
public void getCustomPropertyValues() {
    ICustomBuildStrategy strategy = givenCustomBuildStrategy();
    assertEquals(BuildStrategyType.CUSTOM, source.getPropertyValue(BuildConfigPropertySource.Ids.Type));
    assertEquals(strategy.getImage(), source.getPropertyValue(BuildConfigPropertySource.Ids.CUSTOM_IMAGE));
    assertEquals(strategy.exposeDockerSocket(), source.getPropertyValue(BuildConfigPropertySource.Ids.CUSTOM_EXPOSE_DOCKER_SOCKET));
    assertEquals(new KeyValuePropertySource(strategy.getEnvironmentVariables()), source.getPropertyValue(BuildConfigPropertySource.Ids.CUSTOM_ENV));
}
Also used : ICustomBuildStrategy(com.openshift.restclient.model.build.ICustomBuildStrategy) KeyValuePropertySource(org.jboss.tools.openshift.internal.ui.property.KeyValuePropertySource) Test(org.junit.Test)

Example 2 with KeyValuePropertySource

use of org.jboss.tools.openshift.internal.ui.property.KeyValuePropertySource in project jbosstools-openshift by jbosstools.

the class BuildConfigPropertySourceTest method getSTIPropertyValues.

@Test
public void getSTIPropertyValues() {
    ISourceBuildStrategy strategy = givenSTIBuildStrategy();
    assertEquals(BuildStrategyType.SOURCE, source.getPropertyValue(BuildConfigPropertySource.Ids.Type));
    assertEquals(strategy.getScriptsLocation(), source.getPropertyValue(BuildConfigPropertySource.Ids.STI_SCRIPT_LOCATION));
    assertEquals(strategy.getImage(), source.getPropertyValue(BuildConfigPropertySource.Ids.STI_IMAGE));
    assertEquals(new KeyValuePropertySource(strategy.getEnvironmentVariables()), source.getPropertyValue(BuildConfigPropertySource.Ids.STI_ENV));
}
Also used : ISourceBuildStrategy(com.openshift.restclient.model.build.ISourceBuildStrategy) KeyValuePropertySource(org.jboss.tools.openshift.internal.ui.property.KeyValuePropertySource) Test(org.junit.Test)

Aggregations

KeyValuePropertySource (org.jboss.tools.openshift.internal.ui.property.KeyValuePropertySource)2 Test (org.junit.Test)2 ICustomBuildStrategy (com.openshift.restclient.model.build.ICustomBuildStrategy)1 ISourceBuildStrategy (com.openshift.restclient.model.build.ISourceBuildStrategy)1