We can write the first test for your
State Machine object. Select a method on it, then choose inputs and the
output you expect, then write the test. I might try this:
TransitionTable transitionTable =
TransitionTable.withStartState("a")
.withTransition("a", 1, "b")
.withEndState("b");
StateMachine stateMachine = new StateMachine(transitionTable);
assertEquals("b", stateMachine.transition("a", 1));
assertTrue(statemAchine.isInEndState());

This is a simple test for a simple state machine.

相关文章:

  • 2022-12-23
  • 2021-10-08
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
  • 2021-08-10
  • 2022-12-23
猜你喜欢
  • 2021-07-04
  • 2021-09-15
  • 2021-09-06
  • 2022-01-17
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案