use of io.elastest.etm.model.SutSpecification in project elastest-torm by elastest.
the class ModelsTest method tTobTest.
@Test
public void tTobTest() {
Project project = new Project(3l, "name", new ArrayList<TJob>(), new ArrayList<SutSpecification>());
Project project2 = new Project(3l, "name", new ArrayList<TJob>(), new ArrayList<SutSpecification>());
SutSpecification sut = new SutSpecification(34l, "name", "specification", "description", project, new ArrayList<>(), SutTypeEnum.REPOSITORY, false, null, InstrumentedByEnum.WITHOUT, null, ManagedDockerType.IMAGE, CommandsOptionEnum.DEFAULT);
SutSpecification sut2 = new SutSpecification(34l, "name", "specification", "description", project2, new ArrayList<>(), SutTypeEnum.REPOSITORY, false, null, InstrumentedByEnum.WITHOUT, null, ManagedDockerType.IMAGE, CommandsOptionEnum.DEFAULT);
TJob tjob = new TJob(34l, "name", "imageName", sut, project, false, "execDashboardConfig", null);
TJob tjob2 = new TJob(34l, "name", "imageName", sut2, project2, false, "execDashboardConfig", null);
assertEquals(tjob, tjob2);
assertEquals(tjob.hashCode(), tjob2.hashCode());
}
use of io.elastest.etm.model.SutSpecification in project elastest-torm by elastest.
the class EtmApiItTest method createSut.
protected SutSpecification createSut(long projectId) {
String requestJson = "{" + "\"description\": \"This is a SuT description example\"," + "\"id\": 0," + "\"name\": \"sut_definition_1\"," + "\"project\": { \"id\":" + projectId + "}," + "\"specification\": \"https://github.com/EduJGURJC/springbootdemo\"," + "\"sutType\": \"REPOSITORY\"," + "\"instrumentalize\": \"" + false + "\"," + "\"currentSutExec\": \"" + null + "\"," + "\"instrumentedBy\": \"" + InstrumentedByEnum.WITHOUT + "\"," + "\"port\": \"" + null + "\"," + "\"managedDockerType\": \"" + ManagedDockerType.IMAGE + "\"," + "\"commandsOption\": \"" + CommandsOptionEnum.DEFAULT + "\"" + "}";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<String> entity = new HttpEntity<String>(requestJson, headers);
log.info("POST /api/sut");
ResponseEntity<SutSpecification> response = httpClient.postForEntity("/api/sut", entity, SutSpecification.class);
log.info("Sut created:" + response.getBody());
return response.getBody();
}
use of io.elastest.etm.model.SutSpecification in project elastest-torm by elastest.
the class SutServiceTest method setUp.
@BeforeEach
public void setUp() {
sut = new SutSpecification();
sutExec = new SutExecution(1L, sut, null, null);
}
Aggregations