use of org.onosproject.net.meter.MeterOperations in project onos by opennetworkinglab.
the class MeterManagerTest method testAddBatchFromMeterProgrammable.
/**
* Test batch submission for meter programmable.
*/
@Test
public void testAddBatchFromMeterProgrammable() {
initMeterStore();
List<MeterOperation> operations = ImmutableList.of(new MeterOperation(mProgrammable, MeterOperation.Type.ADD));
manager.defaultProvider().performMeterOperation(PROGRAMMABLE_DID, new MeterOperations(operations));
TestTools.assertAfter(500, () -> {
assertEquals("The meter was not added", 1, meterOperations.size());
assertEquals("Wrong Meter Operation", meterOperations.get(0).meter().id(), mProgrammable.id());
});
}
Aggregations