use of org.onosproject.net.flow.criteria.MplsTcCriterion in project onos by opennetworkinglab.
the class PiCriterionTranslatorsTest method testMplsTcCriterion.
@Test
public void testMplsTcCriterion() throws Exception {
byte[] mplsTc = new byte[1];
random.nextBytes(mplsTc);
int bitWidth = 16;
MplsTcCriterion criterion = (MplsTcCriterion) Criteria.matchMplsTc(mplsTc[0]);
PiExactFieldMatch exactMatch = (PiExactFieldMatch) translateCriterion(criterion, fieldId, EXACT, bitWidth);
assertThat(exactMatch.value().asReadOnlyBuffer().get(1), is(criterion.tc()));
}
Aggregations