import 'package:flutter_test/flutter_test.dart';
import 'package:game_test/game/data/enemy_table.dart';

void main() {
  TestWidgetsFlutterBinding.ensureInitialized();

  test('Load Enemy Table', () async {
    await EnemyTable.load();

    expect(EnemyTable.normalEnemies.isNotEmpty, true);
    expect(EnemyTable.eliteEnemies.isNotEmpty, true);

    final goblin = EnemyTable.normalEnemies.firstWhere(
      (e) => e.name == 'Goblin',
    );
    expect(goblin.baseHp, 20);
    expect(goblin.baseAtk, 5);

    final orc = EnemyTable.eliteEnemies.firstWhere(
      (e) => e.name == 'Orc Warrior',
    );
    expect(orc.baseHp, 60);
  });
}
