Search in sources :

Example 1 with MeterOperations

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());
    });
}
Also used : MeterOperations(org.onosproject.net.meter.MeterOperations) MeterOperation(org.onosproject.net.meter.MeterOperation) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 MeterOperation (org.onosproject.net.meter.MeterOperation)1 MeterOperations (org.onosproject.net.meter.MeterOperations)1