Java 类org.projectfloodlight.openflow.protocol.OFBundleAddMsg 实例源码

项目:loxigen-artifacts    文件:OFBundleAddTest.java   
@Test
public void testBundleAddBuilderWithParent() {
    OFBundleAddMsg bundleAdd = createBundleAdd();

    // validate BuilderWithParent
    OFBundleAddMsg builtFromOtherMessage = bundleAdd.createBuilder()
       .build();

    assertThat(builtFromOtherMessage.getXid(), equalTo(builtFromOtherMessage.getData().getXid()));
}
项目:loxigen-artifacts    文件:OFBundleAddTest.java   
@Test
public void testBundleAddBuilderWithParentOverwrite() {
    OFFlowAdd flowAdd2 = factory.buildFlowAdd().setXid(1234L).build();

    // BuilderWithParent, overwrite with new message
    OFBundleAddMsg bundleAdd = createBundleAdd();

    OFBundleAddMsg builtFromOtherMessage = bundleAdd.createBuilder()
       .setData(flowAdd2)
       .build();

    assertThat(builtFromOtherMessage.getXid(), equalTo(flowAdd2.getXid()));
}
项目:loxigen-artifacts    文件:OFBundleAddTest.java   
@Test
public void testBundleAddBuilder() {
    OFBundleAddMsg bundleAdd = createBundleAdd();
    assertThat(bundleAdd.getXid(), equalTo(flowAdd.getXid()));
}
项目:loxigen-artifacts    文件:OFBundleAddTest.java   
private OFBundleAddMsg createBundleAdd() {
    return factory.buildBundleAddMsg()
            .setBundleId(BundleId.of(1))
            .setData(flowAdd)
            .build();
}