feat(dependencies): add rxdart package and improve string extension methods for better handling of empty strings and gender parsing

This commit is contained in:
mso7nueh
2025-12-04 15:45:54 +03:00
parent 0cd8e662d9
commit 953230b387
100 changed files with 7202 additions and 14 deletions

View File

@@ -0,0 +1,38 @@
import 'package:eatvio_app/features/chat/models/websocket_info_model.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('WebsocketInfoModel', () {
test('создает WebsocketInfoModel с правильными значениями', () {
const model = WebsocketInfoModel(
key: 'test-key',
host: 'localhost',
port: '6001',
cluster: 'mt1',
userId: 123,
);
expect(model.key, 'test-key');
expect(model.host, 'localhost');
expect(model.port, '6001');
expect(model.cluster, 'mt1');
expect(model.userId, 123);
});
test('fromJson создает WebsocketInfoModel из JSON', () {
final json = {
'key': 'test-key',
'host': 'localhost',
'port': '6001',
'cluster': 'mt1',
'user_id': 123,
};
final model = WebsocketInfoModel.fromJson(json);
expect(model.key, 'test-key');
expect(model.userId, 123);
});
});
}