правки по лаунчеру

This commit is contained in:
2026-07-28 20:43:53 +04:00
parent 155922a3f1
commit 0b6f7fc647
51 changed files with 3158 additions and 437 deletions
@@ -0,0 +1,13 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:moonwell_launcher/features/launcher/domain/entities/launcher_account.dart';
void main() {
test('LauncherAccount parses username without exposing balance', () {
final account = LauncherAccount.fromJson(<String, Object?>{
'username': 'PLAYERONE',
'balance': '1250.00',
});
expect(account.username, 'PLAYERONE');
});
}
@@ -0,0 +1,26 @@
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');
});
}