Exemplo n.º 1
0
  @Test
  public void to_dot() {
    StateMachine atm = new ATMStateMachine();

    System.out.println("DOT notation for ATM:");
    System.out.println(atm.toDot(false));

    // Force the composite state to active state for producing DOT notation of the composite state
    atm.activeStateConfiguration(Arrays.asList(SERVING_CUSTOMER, AUTHENTICATION));
    System.out.println("DOT notation for Composite state ServingCustomer:");
    System.out.println(((CompositeState) atm.getActiveState()).toDot(false));
  }