You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pinball/test/start_game/bloc/start_game_state_test.dart

44 lines
982 B

// ignore_for_file: prefer_const_constructors
import 'package:flutter_test/flutter_test.dart';
import 'package:pinball/start_game/bloc/start_game_bloc.dart';
void main() {
group('StartGameState', () {
final testState = StartGameState(
status: StartGameStatus.selectCharacter,
);
test('initial state has correct values', () {
final state = StartGameState(
status: StartGameStatus.initial,
);
expect(state, StartGameState.initial());
});
test('supports value equality', () {
final secondState = StartGameState(
status: StartGameStatus.selectCharacter,
);
expect(testState, secondState);
});
test('supports copyWith', () {
final secondState = testState.copyWith();
expect(testState, secondState);
});
test('has correct props', () {
expect(
testState.props,
equals([
StartGameStatus.selectCharacter,
]),
);
});
});
}