Example usage for org.apache.commons.scxml.model TransitionTarget setId

List of usage examples for org.apache.commons.scxml.model TransitionTarget setId

Introduction

In this page you can find the example usage for org.apache.commons.scxml.model TransitionTarget setId.

Prototype

public final void setId(final String id) 

Source Link

Document

Set the identifier for this transition target.

Usage

From source file:org.finra.datagenerator.engine.scxml.PossibleStateTest.java

/**
 * Possible state is a value object tracking a TransitionTarget and a Map of variable/value pairs
 *///  ww w .java 2  s .com
@Test
public void constructorTest() {
    TransitionTarget dummyState = new TransitionTarget() {
    };
    dummyState.setId("Dummy State");
    Map<String, String> variables = new HashMap<>();
    PossibleState testState = new PossibleState(dummyState, variables);

    Assert.assertSame(dummyState, testState.nextState);
    Assert.assertSame(variables, testState.variables);
}

From source file:org.finra.datagenerator.engine.scxml.PossibleStateTest.java

/**
 * Custom toString() method/* w  w  w.j ava2  s. com*/
 */
@Test
public void toStringTest() {
    TransitionTarget dummyState = new TransitionTarget() {
    };
    dummyState.setId("Dummy State");
    Map<String, String> variables = new HashMap<>();
    PossibleState testState = new PossibleState(dummyState, variables);

    Assert.assertEquals("<Dummy State;{}>", testState.toString());
}