use of de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelRequest in project FAAAST-Service by FraunhoferIOSB.
the class RequestHandlerManagerTest method testPutSubmodelRequest.
@Test
public void testPutSubmodelRequest() throws ResourceNotFoundException {
when(persistence.put(environment.getSubmodels().get(0))).thenReturn(environment.getSubmodels().get(0));
PutSubmodelRequest request = new PutSubmodelRequest.Builder().id(environment.getSubmodels().get(0).getIdentification()).submodel(environment.getSubmodels().get(0)).outputModifier(new OutputModifier()).submodel(environment.getSubmodels().get(0)).build();
PutSubmodelResponse response = manager.execute(request);
PutSubmodelResponse expected = new PutSubmodelResponse.Builder().payload(environment.getSubmodels().get(0)).statusCode(StatusCode.Success).build();
Assert.assertEquals(expected, response);
}
Aggregations