cpd_David_und_Yusuf/test/player_test.dart

21 lines
621 B
Dart
Raw Permalink Normal View History

2024-06-13 01:30:02 +02:00
import 'package:flutter_test/flutter_test.dart';
import 'package:werwolf/models/player.dart';
import 'package:werwolf/models/role.dart';
2024-06-07 20:30:18 +02:00
2024-06-13 01:30:02 +02:00
void main() {
group('Player Tests', () {
test('Player creation', () {
Player player = Player(name: 'Alice', role: Role.dorfbewohner, isDead: false);
expect(player.name, 'Alice');
expect(player.role, Role.dorfbewohner);
expect(player.isDead, false);
});
test('Player status change', () {
Player player = Player(name: 'Bob', role: Role.werwolf, isDead: false);
player.isDead = true;
expect(player.isDead, true);
});
});
}