src/test/java/nl/uva/qcdis/sdia/commons/utils/ToscaHelperTest.java
/**
     * Test of NodeDesiredState2CloudStormOperation method, of class
     * ToscaHelper.
     */
Test of NodeDesiredState2CloudStormOperation method, of class
ToscaHelper.
Test of NodeDesiredState2CloudStormOperation method of class ToscaHelper .
@Test
    public void testNodeDesiredState2CloudStormOperation() {
        System.out.println("NodeDesiredState2CloudStormOperation");
        Constants.NODE_STATES nodeDesiredState = Constants.NODE_STATES.RUNNING;
        OpCode.OperationEnum expResult = OpCode.OperationEnum.PROVISION;
        OpCode.OperationEnum result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
        assertEquals(expResult, result);
        nodeDesiredState = Constants.NODE_STATES.DELETED;
        expResult = OpCode.OperationEnum.DELETE;
        result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
        assertEquals(expResult, result);
        nodeDesiredState = Constants.NODE_STATES.STOPPED;
        expResult = OpCode.OperationEnum.STOP;
        result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
        assertEquals(expResult, result);
        nodeDesiredState = Constants.NODE_STATES.STARTED;
        expResult = OpCode.OperationEnum.START;
        result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
        assertEquals(expResult, result);
    }
@ Test public void testNodeDesiredState2CloudStormOperation ( ) { System . out . println ( "NodeDesiredState2CloudStormOperation" ) ; Constants . NODE_STATES nodeDesiredState = Constants . NODE_STATES . RUNNING ; OpCode . OperationEnum expResult = OpCode . OperationEnum . PROVISION ; OpCode . OperationEnum result = ToscaHelper . NodeDesiredState2CloudStormOperation ( nodeDesiredState ) ; assertEquals ( expResult , result ) ; nodeDesiredState = Constants . NODE_STATES . DELETED ; expResult = OpCode . OperationEnum . DELETE ; result = ToscaHelper . NodeDesiredState2CloudStormOperation ( nodeDesiredState ) ; assertEquals ( expResult , result ) ; nodeDesiredState = Constants . NODE_STATES . STOPPED ; expResult = OpCode . OperationEnum . STOP ; result = ToscaHelper . NodeDesiredState2CloudStormOperation ( nodeDesiredState ) ; assertEquals ( expResult , result ) ; nodeDesiredState = Constants . NODE_STATES . STARTED ; expResult = OpCode . OperationEnum . START ; result = ToscaHelper . NodeDesiredState2CloudStormOperation ( nodeDesiredState ) ; assertEquals ( expResult , result ) ; }
Test of NodeDesiredState2CloudStormOperation method, of class
 ToscaHelper.
Test of NodeDesiredState2CloudStormOperation method of class ToscaHelper .