示例#1
0
 @Test
 public void testUpdateDbEntityWithSoapModelNoDbEntity() {
   ConfigurationModel dbEntity = null;
   Configuration soapModel = modelFactory.getSampleConfiguration();
   dozerMapperService.updateDbEntityWithSoapModel(dbEntity, soapModel);
   assertNull(dbEntity);
 }
示例#2
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());
 }
示例#3
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());
 }
示例#4
0
 @Test
 public void testMapDbEntityToSoapModelEmptyDbEntity() {
   assertNotNull(dozerMapperService.mapDbEntityToSoapModel(new ConfigurationModel()));
 }
示例#5
0
 @Test
 public void testMapDbEntityToSoapModelNoDbEntity() {
   assertNotNull(dozerMapperService.mapDbEntityToSoapModel(null));
 }