Package javaflow.network.api

Examples of javaflow.network.api.PortReference.portName()


    @Test
    public void simplePort() {
        PortReference ref = PortReference.parse("in.OUT");
        Assert.assertEquals(ref.componentName(), "in");
        Assert.assertEquals(ref.portName(), "OUT");
        Assert.assertEquals(ref.componentAndPortName(), "in.OUT");
        Assert.assertFalse(ref.isArrayPort());
        Assert.assertEquals(ref.toString(), "in.OUT");
    }
View Full Code Here


    @Test
    public void arrayPort() {
        PortReference ref = PortReference.parse("in.BLAAH[0]");
        Assert.assertEquals(ref.componentName(), "in");
        Assert.assertEquals(ref.portName(), "BLAAH");
        Assert.assertEquals(ref.componentAndPortName(), "in.BLAAH");
        Assert.assertTrue(ref.isArrayPort());
        Assert.assertEquals(ref.portIndex(), 0);
        Assert.assertEquals(ref.toString(), "in.BLAAH[0]");
    }
View Full Code Here

    @Test
    public void simplePortNoComponent() {
        PortReference ref = PortReference.parse("OUT");
        Assert.assertEquals(ref.componentName(), null);
        Assert.assertEquals(ref.portName(), "OUT");
        Assert.assertEquals(ref.componentAndPortName(), null);
        Assert.assertFalse(ref.isArrayPort());
        Assert.assertEquals(ref.toString(), "OUT");
    }
View Full Code Here

    @Test
    public void arrayPortNoComponent() {
        PortReference ref = PortReference.parse("BLAAH[0]");
        Assert.assertEquals(ref.componentName(), null);
        Assert.assertEquals(ref.portName(), "BLAAH");
        Assert.assertEquals(ref.componentAndPortName(), null);
        Assert.assertTrue(ref.isArrayPort());
        Assert.assertEquals(ref.portIndex(), 0);
        Assert.assertEquals(ref.toString(), "BLAAH[0]");
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.