platform/angel_serialize_generator/test/default_value_test.dart

25 lines
477 B
Dart
Raw Normal View History

2018-12-31 01:18:44 +00:00
import 'package:test/test.dart';
import 'models/goat.dart';
void main() {
group('constructor', () {
test('int default', () {
expect(Goat().integer, 34);
});
test('list default', () {
expect(Goat().list, [34, 35]);
});
});
group('from map', () {
test('int default', () {
expect(GoatSerializer.fromMap({}).integer, 34);
});
test('list default', () {
expect(GoatSerializer.fromMap({}).list, [34, 35]);
});
});
}