createFailMessage method

String createFailMessage(
  1. TesterStateMachine<Object, Object> stateMachine
)

Create a fail message.

Implementation

String createFailMessage(TesterStateMachine stateMachine) {
  final message = StringBuffer()
    ..writeln('Expected State: ${afterState.runtimeType}')
    ..writeln('Actual State: ${stateMachine.state.runtimeType}')
    ..write('Expected SideEffect: ')
    ..writeln(createdSideEffect.map((e) => e.runtimeType).toList())
    ..write('Actual SideEffect: ')
    ..writeln(
      stateMachine.createdSideEffect.map((e) => e.runtimeType).toList(),
    );
  return message.toString();
}