/** The accuracy test for the method {@link ZUMLFlowFinalNodeImpl#convertToTCUML()}. */ public void testConvertToTCUML() { ZUMLFlowFinalNodeImpl instance = new ZUMLFlowFinalNodeImpl(); instance.setName("final"); Namespace namespace = new CollaborationImpl(); instance.setNamespace(namespace); instance.setVisibility(null); instance.setSpecification(true); ModelElement element = instance.convertToTCUML(); assertTrue(element instanceof FinalState); assertEquals(1, element.getTaggedValues().size()); TaggedValue taggedValue = (TaggedValue) element.getTaggedValues().toArray()[0]; assertEquals("FlowFinalNode", taggedValue.getDataValue()); assertEquals("FinalNodeType", taggedValue.getType().getTagType()); // Verify that the simple attributes are copied. assertEquals("final", element.getName()); assertEquals(namespace, element.getNamespace()); assertNull(element.getVisibility()); assertTrue(element.isSpecification()); }
/** Test redoAction(). */ public void testRedoAction() { instance.redoAction(); assertEquals("redoAction() is incorrect.", "newValue", taggedValue.getDataValue()); }
/** * Test executeAction(). * * @throws Exception exception to JUnit. */ public void testExecuteAction() throws Exception { instance.executeAction(); assertEquals("executeAction() is incorrect.", "newValue", taggedValue.getDataValue()); }
/** Test undoAction()</code>. */ public void testUndoAction() { instance.undoAction(); assertEquals("undoAction() is incorrect.", "oldValue", taggedValue.getDataValue()); }