Esempio n. 1
0
 @Test
 public void testNwTos() {
   Condition cond = new Condition();
   pktCtx.inPortId_$eq(new UUID(rand.nextLong(), rand.nextLong()));
   Assert.assertTrue(cond.matches(pktCtx));
   cond.nwTos = 5;
   Assert.assertFalse(cond.matches(pktCtx));
   cond.nwTosInv = true;
   Assert.assertTrue(cond.matches(pktCtx));
   cond.nwTosInv = false;
   cond.nwTos = 34;
   Assert.assertTrue(cond.matches(pktCtx));
   cond.nwTosInv = true;
   Assert.assertFalse(cond.matches(pktCtx));
 }