default sensor test succeed
This commit is contained in:
		
							parent
							
								
									dc5d5aa56d
								
							
						
					
					
						commit
						d8c8101dba
					
				@ -25,11 +25,16 @@ public class CentralSensorItemService implements SensorItemService {
 | 
			
		||||
  @Autowired
 | 
			
		||||
  private CentralSensorService sensorService;
 | 
			
		||||
 | 
			
		||||
  @Transactional
 | 
			
		||||
  public SensorItem regist(Sensor sensor, MetaDisplayItemMapping metaDisplayItemMapping) throws OverflowException {
 | 
			
		||||
    SensorItem sensorItem = new SensorItem();
 | 
			
		||||
    sensorItem.setMetaDisplayItemMapping(metaDisplayItemMapping);
 | 
			
		||||
    sensorItem.setSensor(sensor);
 | 
			
		||||
    return this.sensorItemDAO.save(sensorItem);
 | 
			
		||||
    SensorItem retSensorItem = this.sensorItemDAO.save(sensorItem);
 | 
			
		||||
    if (null != retSensorItem) {
 | 
			
		||||
      this.sensorService.increaseSensorItemCount(sensor.getId());
 | 
			
		||||
    }
 | 
			
		||||
    return retSensorItem;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
 | 
			
		||||
@ -37,6 +37,7 @@ public class CentralSensorService implements SensorService {
 | 
			
		||||
  @Autowired
 | 
			
		||||
  private CentralSensorConfigService sensorConfigService;
 | 
			
		||||
 | 
			
		||||
  @Transactional
 | 
			
		||||
  public void registDefaults(List<Target> targets) throws OverflowException {
 | 
			
		||||
    for (Target target : targets) {
 | 
			
		||||
      this.registDefault(target);
 | 
			
		||||
 | 
			
		||||
@ -44,9 +44,10 @@ public class SensorServiceTest {
 | 
			
		||||
  InfraService infraService;
 | 
			
		||||
 | 
			
		||||
  @Test
 | 
			
		||||
  @Ignore
 | 
			
		||||
  public void registDefault() throws Exception {
 | 
			
		||||
    Long tempInfraID = Long.valueOf(1);
 | 
			
		||||
    Long tempProbeID = Long.valueOf(1);
 | 
			
		||||
    Long tempInfraID = Long.valueOf(28); // ssh
 | 
			
		||||
    Long tempProbeID = Long.valueOf(3);
 | 
			
		||||
 | 
			
		||||
    Infra infra = this.infraService.read(tempInfraID);
 | 
			
		||||
    List<Long> infraIDs = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user