Examples of NeutronNodeWrapper


Examples of org.apache.cloudstack.network.opendaylight.api.model.NeutronNodeWrapper

    private final Gson gsonNeutronNode = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();

    @Test
    public void gsonNeutronPortMarshalingTest() throws NeutronRestApiException {
        NeutronNode node = new NeutronNode("node-test", "test");
        NeutronNodeWrapper nodeWrapper = new NeutronNodeWrapper(node);

        StringRequestEntity entity;
        try {
            entity = new StringRequestEntity(gsonNeutronNode.toJson(nodeWrapper), "application/json", null);
View Full Code Here

Examples of org.apache.cloudstack.network.opendaylight.api.model.NeutronNodeWrapper

        }
    }

    @Test
    public <T> void gsonNeutronPortUnmarshalingTest() throws NeutronRestApiException {
        NeutronNodeWrapper returnValue = (NeutronNodeWrapper) gsonNeutronNode.fromJson(jsonString, TypeToken.get(NeutronNodeWrapper.class).getType());

        Assert.assertNotNull(returnValue);
        Assert.assertEquals("node-test", returnValue.getNode().getId().toString());
    }
View Full Code Here

Examples of org.apache.cloudstack.network.opendaylight.api.model.NeutronNodeWrapper

    }

    @Test
    public <T> void gsonNeutronPortUnmarshalingNullTest() throws NeutronRestApiException {
        String json = null;
        NeutronNodeWrapper returnValue = (NeutronNodeWrapper) gsonNeutronNode.fromJson(json, TypeToken.get(NeutronNodeWrapper.class).getType());

        Assert.assertNull(returnValue);
    }
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.