use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.responses.DatabaseV4Response in project cloudbreak by hortonworks.
the class DatabaseV4ControllerTest method testDeleteByName.
@Test
public void testDeleteByName() {
when(service.deleteByName(DB_NAME, ENVIRONMENT_CRN)).thenReturn(db);
when(databaseConfigToDatabaseV4ResponseConverter.convert(db)).thenReturn(response);
DatabaseV4Response response = underTest.deleteByName(ENVIRONMENT_CRN, DB_NAME);
assertEquals(db.getName(), response.getName());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.responses.DatabaseV4Response in project cloudbreak by hortonworks.
the class DatabaseV4ControllerTest method testDeleteByCrn.
@Test
public void testDeleteByCrn() {
when(service.deleteByCrn(DB_CRN)).thenReturn(db);
when(databaseConfigToDatabaseV4ResponseConverter.convert(db)).thenReturn(response);
DatabaseV4Response response = underTest.deleteByCrn(DB_CRN);
assertEquals(db.getName(), response.getName());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.responses.DatabaseV4Response in project cloudbreak by hortonworks.
the class DatabaseV4ControllerTest method testGetByName.
@Test
public void testGetByName() {
when(service.getByName(DB_NAME, ENVIRONMENT_CRN)).thenReturn(db);
when(databaseConfigToDatabaseV4ResponseConverter.convert(any())).thenReturn(new DatabaseV4Response());
DatabaseV4Response response = underTest.getByName(ENVIRONMENT_CRN, DB_NAME);
assertNotNull(response);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.responses.DatabaseV4Response in project cloudbreak by hortonworks.
the class DatabaseV4ControllerTest method testGetByCrn.
@Test
public void testGetByCrn() {
when(service.getByCrn(DB_CRN)).thenReturn(db);
when(databaseConfigToDatabaseV4ResponseConverter.convert(any())).thenReturn(new DatabaseV4Response());
DatabaseV4Response response = underTest.getByCrn(DB_CRN);
assertNotNull(response);
}
Aggregations