mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +00:00
Re-add Craig Labenz's code sharing sample (#1466)
* Revert "Revert "Add code sharing sample (#1444)" (#1464)"
This reverts commit dc50c46ef1.
* Opting out failing tests on Windows for CI
Co-authored-by: Craig Labenz <craig.labenz@gmail.com>
This commit is contained in:
17
code_sharing/server/shared/test/shared_test.dart
Normal file
17
code_sharing/server/shared/test/shared_test.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
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));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user