You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
samples/code_sharing/shared/test/shared_test.dart

18 lines
535 B

import 'package:shared/shared.dart';
import 'package:test/test.dart';
void main() {
test('Increment serialization', () {
expect(Increment(by: 3).toJson(), <String, dynamic>{'by': 3});
});
test('Increment derialization', () {
expect(Increment.fromJson(<String, dynamic>{'by': 5}), Increment(by: 5));
});
test('Count serialization', () {
expect(Count(3).toJson(), <String, dynamic>{'value': 3});
});
test('Count derialization', () {
expect(Count.fromJson(<String, dynamic>{'value': 5}), Count(5));
});
}