use of org.eclipse.che.api.agent.shared.model.impl.AgentKeyImpl in project che by eclipse.
the class AgentKeyImplTest method testAgentKeyWithNameAndVersion.
@Test
public void testAgentKeyWithNameAndVersion() {
AgentKeyImpl agentKey = AgentKeyImpl.parse("id:1");
assertEquals(agentKey.getId(), "id");
assertEquals(agentKey.getVersion(), "1");
}
use of org.eclipse.che.api.agent.shared.model.impl.AgentKeyImpl in project che by eclipse.
the class AgentRegistryImplTest method shouldReturnAgentByIdAndVersion.
@Test(dataProvider = "AgentKeys")
public void shouldReturnAgentByIdAndVersion(String id, String version) throws Exception {
Agent agent = registry.getAgent(new AgentKeyImpl(id, version));
assertNotNull(agent);
assertEquals(agent.getName(), String.format("%s:%s", id, (version == null ? "latest" : version)));
}
use of org.eclipse.che.api.agent.shared.model.impl.AgentKeyImpl in project che by eclipse.
the class AgentKeyImplTest method testParseAgentKeyWithId.
@Test
public void testParseAgentKeyWithId() {
AgentKeyImpl agentKey = AgentKeyImpl.parse("id");
assertEquals(agentKey.getId(), "id");
assertEquals(agentKey.getVersion(), "latest");
}
Aggregations