use of org.eclipse.che.api.workspace.server.model.impl.devfile.EndpointImpl in project devspaces-images by redhat-developer.
the class ServerConfigImplTest method testCreateFromEndpointTranslatePublicTrue.
@Test
public void testCreateFromEndpointTranslatePublicTrue() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("name", 123, singletonMap("public", "true")));
assertFalse(serverConfig.isInternal());
}
use of org.eclipse.che.api.workspace.server.model.impl.devfile.EndpointImpl in project devspaces-images by redhat-developer.
the class ServerConfigImplTest method testStoreEndpointNameIntoAttributes.
@Test
public void testStoreEndpointNameIntoAttributes() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("blabol", 123, emptyMap()));
assertEquals(serverConfig.getAttributes().get(SERVER_NAME_ATTRIBUTE), "blabol");
}
use of org.eclipse.che.api.workspace.server.model.impl.devfile.EndpointImpl in project devspaces-images by redhat-developer.
the class ServerConfigImplTest method testCreateFromEndpointTranslateProtocol.
@Test
public void testCreateFromEndpointTranslateProtocol() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("name", 123, singletonMap("protocol", "hello")));
assertEquals(serverConfig.getProtocol(), "hello");
}
use of org.eclipse.che.api.workspace.server.model.impl.devfile.EndpointImpl in project devspaces-images by redhat-developer.
the class ServerConfigImplTest method testCreateFromEndpointTranslatePath.
@Test
public void testCreateFromEndpointTranslatePath() {
ServerConfig serverConfig = ServerConfigImpl.createFromEndpoint(new EndpointImpl("name", 123, singletonMap("path", "hello")));
assertEquals(serverConfig.getPath(), "hello");
}
use of org.eclipse.che.api.workspace.server.model.impl.devfile.EndpointImpl in project devspaces-images by redhat-developer.
the class DevfileParserTest method testInitializingDevfileMapsAfterParsing.
@Test
public void testInitializingDevfileMapsAfterParsing() throws Exception {
// given
CommandImpl command = new CommandImpl();
command.getActions().add(new ActionImpl());
devfile.getCommands().add(command);
ComponentImpl component = new ComponentImpl();
component.getEndpoints().add(new EndpointImpl());
devfile.getComponents().add(component);
// when
DevfileImpl parsed = devfileParser.parseYaml(DEVFILE_YAML_CONTENT);
// then
assertNotNull(parsed.getCommands().get(0).getAttributes());
assertNotNull(parsed.getComponents().get(0).getSelector());
assertNotNull(parsed.getComponents().get(0).getEndpoints().get(0).getAttributes());
}
Aggregations