Search in sources :

Example 1 with GetAllSubmodelsByIdShortRequest

use of de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest in project FAAAST-Service by FraunhoferIOSB.

the class RequestHandlerManagerTest method testGetAllSubmodelsByIdShortRequest.

@Test
public void testGetAllSubmodelsByIdShortRequest() throws ResourceNotFoundException {
    when(persistence.get("Test", (Reference) null, new OutputModifier())).thenReturn(environment.getSubmodels());
    GetAllSubmodelsByIdShortRequest request = new GetAllSubmodelsByIdShortRequest.Builder().idShort("Test").outputModifier(new OutputModifier()).build();
    GetAllSubmodelsByIdShortResponse response = manager.execute(request);
    GetAllSubmodelsByIdShortResponse expected = new GetAllSubmodelsByIdShortResponse.Builder().payload(environment.getSubmodels()).statusCode(StatusCode.Success).build();
    Assert.assertEquals(expected, response);
}
Also used : OutputModifier(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier) GetAllSubmodelsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest) GetAllSubmodelsByIdShortResponse(de.fraunhofer.iosb.ilt.faaast.service.model.api.response.GetAllSubmodelsByIdShortResponse) Test(org.junit.Test)

Aggregations

OutputModifier (de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier)1 GetAllSubmodelsByIdShortResponse (de.fraunhofer.iosb.ilt.faaast.service.model.api.response.GetAllSubmodelsByIdShortResponse)1 GetAllSubmodelsByIdShortRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest)1 Test (org.junit.Test)1