Search in sources :

Example 6 with XtendBeanGenerator

use of ch.vorburger.xtendbeans.XtendBeanGenerator in project genius by opendaylight.

the class InstructionWriteActionsTest method xtendBeanGenerator.

@Test
public void xtendBeanGenerator() {
    XtendBeanGenerator generator = new XtendBeanGenerator();
    assertEquals("new InstructionWriteActions(#[\n" + "    (new ActionGroupBuilder => [\n" + "        groupId = 1L\n" + "    ]).build()\n" + "])", generator.getExpression(INSTRUCTION_INFO));
}
Also used : XtendBeanGenerator(ch.vorburger.xtendbeans.XtendBeanGenerator) Test(org.junit.Test)

Example 7 with XtendBeanGenerator

use of ch.vorburger.xtendbeans.XtendBeanGenerator in project genius by opendaylight.

the class FlowEntityAssertBeansTest method testXtendBeanGenerator.

@Test
public void testXtendBeanGenerator() {
    XtendBeanGenerator generator = new XtendBeanGenerator();
    assertThat(generator.getExpression(FLOW1)).isEqualTo("(new FlowEntityBuilder => [\n" + "    cookie = 1114112bi\n" + "    dpnId = 1bi\n" + "    flowId = \"A\"\n" + "    hardTimeOut = 0\n" + "    idleTimeOut = 0\n" + "    instructionInfoList = #[\n" + "    ]\n" + "    matchInfoList = #[\n" + "        new MatchIpv4Source(new Ipv4Prefix(\"10.0.0.1/32\"))\n" + "    ]\n" + "    priority = 0\n" + "    sendFlowRemFlag = false\n" + "    strictFlag = false\n" + "    tableId = 1 as short\n" + "]).build()");
}
Also used : XtendBeanGenerator(ch.vorburger.xtendbeans.XtendBeanGenerator) Test(org.junit.Test)

Aggregations

XtendBeanGenerator (ch.vorburger.xtendbeans.XtendBeanGenerator)7 Test (org.junit.Test)6 ComparisonFailure (org.junit.ComparisonFailure)1 FlowEntity (org.opendaylight.genius.mdsalutil.FlowEntity)1