src/test/java/nl/uva/qcdis/sdia/commons/utils/ToscaHelperTest.java
/**
     * Test of setNodeCurrentState method, of class ToscaHelper.
     *
     * @throws java.io.IOException
     * @throws com.fasterxml.jackson.core.JsonProcessingException
     * @throws nl.uva.qcdis.sdia.sure.tosca.client.ApiException
     */
Test of setNodeCurrentState method, of class ToscaHelper.
Test of setNodeCurrentState method of class ToscaHelper .
@Test
    public void testSetNodeCurrentState() throws IOException, JsonProcessingException, ApiException {
        if (serviceUp) {
            System.out.println("setNodeCurrentState");
            instance.uploadToscaTemplate(provisionedToscaTemplate);
            NodeTemplateMap node = instance.getVMTopologyTemplates().get(0);
            Constants.NODE_STATES nodeState = Constants.NODE_STATES.DELETED;
            NodeTemplateMap result = instance.setNodeCurrentState(node, nodeState);
            assertEquals(instance.getNodeCurrentState(node), nodeState);
            instance.setNodeCurrentState(node, null);
        }
    }
@ Test public void testSetNodeCurrentState ( ) throws IOException , JsonProcessingException , ApiException { if ( serviceUp ) { System . out . println ( "setNodeCurrentState" ) ; instance . uploadToscaTemplate ( provisionedToscaTemplate ) ; NodeTemplateMap node = instance . getVMTopologyTemplates ( ) . get ( 0 ) ; Constants . NODE_STATES nodeState = Constants . NODE_STATES . DELETED ; NodeTemplateMap result = instance . setNodeCurrentState ( node , nodeState ) ; assertEquals ( instance . getNodeCurrentState ( node ) , nodeState ) ; instance . setNodeCurrentState ( node , null ) ; } }
Test of setNodeCurrentState method, of class ToscaHelper.
Test of setNodeCurrentState method of class ToscaHelper .