27 lines
780 B
Dart
27 lines
780 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:moonwell_launcher/features/launcher/domain/entities/launcher_realm.dart';
|
|
|
|
void main() {
|
|
test('LauncherRealm parses launcher realms payload', () {
|
|
final realm = LauncherRealm.fromJson(<String, Object?>{
|
|
'id': 1,
|
|
'name': 'MoonWell',
|
|
'address': 'logon.moon-well.online',
|
|
'port': 8085,
|
|
'population': 0.5,
|
|
'game_build': 12340,
|
|
'online': true,
|
|
'status': 'online',
|
|
});
|
|
|
|
expect(realm.id, 1);
|
|
expect(realm.name, 'MoonWell');
|
|
expect(realm.address, 'logon.moon-well.online');
|
|
expect(realm.port, 8085);
|
|
expect(realm.population, 0.5);
|
|
expect(realm.gameBuild, 12340);
|
|
expect(realm.online, isTrue);
|
|
expect(realm.status, 'online');
|
|
});
|
|
}
|