rename package folders

This commit is contained in:
Salvatore Giordano
2021-02-01 15:45:58 +01:00
parent 6682ad5e8b
commit 964a428f2e
445 changed files with 1 additions and 343 deletions
@@ -0,0 +1,31 @@
import 'dart:convert';
import 'package:test/test.dart';
import 'package:stream_chat/src/models/device.dart';
void main() {
group('src/models/device', () {
const jsonExample = r'''{
"id": "device-id",
"push_provider": "push-provider"
}''';
test('should parse json correctly', () {
final device = Device.fromJson(json.decode(jsonExample));
expect(device.id, 'device-id');
expect(device.pushProvider, 'push-provider');
});
test('should serialize to json correctly', () {
final device = Device(id: 'device-id', pushProvider: 'push-provider');
expect(
device.toJson(),
{
'id': 'device-id',
'push_provider': 'push-provider',
},
);
});
});
}