예제 #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 testUpdateDbEntityWithSoapModelNoSoapModel() {
   ConfigurationModel dbEntity = modelFactory.getSampleConfigurationModel();
   Configuration soapModel = null;
   dozerMapperService.updateDbEntityWithSoapModel(dbEntity, soapModel);
   assertNotNull(dbEntity);
   assertEquals(0, dbEntity.getFps());
   assertNull(dbEntity.getLogoColor());
   assertEquals(Model.LOGO, dbEntity.getModel() == 1 ? Model.LOGO : Model.CAR);
   assertEquals(0, dbEntity.getThreshold());
 }