예제 #1
0
 @Test
 public void testMapDbEntityToSoapModel() {
   ConfigurationModel dbEntity = modelFactory.getSampleConfigurationModel();
   Configuration soapModel = dozerMapperService.mapDbEntityToSoapModel(dbEntity);
   assertNotNull(soapModel);
   assertEquals(dbEntity.getFps(), soapModel.getFps());
   assertEquals(dbEntity.getLogoColor(), soapModel.getLogoColor());
   assertEquals(dbEntity.getModel() == 1 ? Model.LOGO : Model.CAR, soapModel.getModel());
   assertEquals(dbEntity.getThreshold(), soapModel.getThreshold());
 }
예제 #2
0
 @Test
 public void testUpdateDbEntityWithSoapModel() {
   ConfigurationModel dbEntity = modelFactory.getSampleConfigurationModel();
   Configuration soapModel = modelFactory.getSampleConfiguration();
   dozerMapperService.updateDbEntityWithSoapModel(dbEntity, soapModel);
   assertNotNull(dbEntity);
   assertEquals(soapModel.getFps(), dbEntity.getFps());
   assertEquals(soapModel.getLogoColor(), dbEntity.getLogoColor());
   assertEquals(soapModel.getModel(), dbEntity.getModel() == 1 ? Model.LOGO : Model.CAR);
   assertEquals(soapModel.getThreshold(), dbEntity.getThreshold());
   assertEquals(soapModel.isThresholdChecked(), dbEntity.isThresholdChecked());
 }