src/test/java/nl/uva/qcdis/sdia/commons/utils/ToscaHelperTest.java
/**
     * Test of getNodeCurrentState 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 getNodeCurrentState method, of class ToscaHelper.
Test of getNodeCurrentState method of class ToscaHelper .
@Test
    public void testGetNodeCurrentState() throws IOException, JsonProcessingException, ApiException {
        if (serviceUp) {
            System.out.println("getNodeCurrentState");
            instance.uploadToscaTemplate(provisionedToscaTemplate);
            NodeTemplateMap node = instance.getVMTopologyTemplates().get(0);
            Constants.NODE_STATES expResult = Constants.NODE_STATES.RUNNING;
            Constants.NODE_STATES result = instance.getNodeCurrentState(node);
            assertEquals(expResult, result);
        }
    }
@ Test public void testGetNodeCurrentState ( ) throws IOException , JsonProcessingException , ApiException { if ( serviceUp ) { System . out . println ( "getNodeCurrentState" ) ; instance . uploadToscaTemplate ( provisionedToscaTemplate ) ; NodeTemplateMap node = instance . getVMTopologyTemplates ( ) . get ( 0 ) ; Constants . NODE_STATES expResult = Constants . NODE_STATES . RUNNING ; Constants . NODE_STATES result = instance . getNodeCurrentState ( node ) ; assertEquals ( expResult , result ) ; } }
Test of getNodeCurrentState method, of class ToscaHelper.
Test of getNodeCurrentState method of class ToscaHelper .