FindThresholdTest.java (moskito-moskito-2.9.3) | : | FindThresholdTest.java (moskito-moskito-2.10.0) | ||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
} | } | |||
@Test public void findUsed(){ | @Test public void findUsed(){ | |||
ThresholdDefinition config = new ThresholdDefinition(); | ThresholdDefinition config = new ThresholdDefinition(); | |||
config.setProducerName("Heap memory"); | config.setProducerName("Heap memory"); | |||
config.setStatName("Heap memory"); | config.setStatName("Heap memory"); | |||
config.setValueName("USED"); | config.setValueName("USED"); | |||
config.setIntervalName(null); | config.setIntervalName(null); | |||
IProducerRegistryAPI registryAPI = new ProducerRegistryAPIFactory ().createProducerRegistryAPIForUnitTest(); | IProducerRegistryAPI registryAPI = new ProducerRegistryAPIFactory ().createProducerRegistryAPIForUnitTest(); | |||
System.out.println("ALL: "+registryAPI.getAllProducers()); | ||||
IStatsProducer<?> producer = registryAPI.getProducer(config.getPr oducerName()); | IStatsProducer<?> producer = registryAPI.getProducer(config.getPr oducerName()); | |||
assertNotNull(producer); | assertNotNull(producer); | |||
IStats target = null; | IStats target = null; | |||
for (IStats s : producer.getStats()){ | for (IStats s : producer.getStats()){ | |||
if (s.getName().equals(config.getStatName())){ | if (s.getName().equals(config.getStatName())){ | |||
target = s; | target = s; | |||
break; | break; | |||
} | } | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 0 lines changed or added |