platform/test/util_test.dart
thosakwe@gmail.com ae4a434477 Coverage start...
2017-05-27 08:39:45 -04:00

33 lines
646 B
Dart

import 'package:angel_framework/angel_framework.dart';
import 'package:test/test.dart';
class Foo {
String name;
Foo(String this.name);
}
main() {
group('Utilities', () {
Angel app;
setUp(() {
app = new Angel();
});
tearDown(() async {
await app.close();
app = null;
});
test('can use app.properties like members', () {
app.properties['hello'] = 'world';
app.properties['foo'] = () => 'bar';
app.properties['Foo'] = new Foo('bar');
expect(app.hello, equals('world'));
expect(app.foo(), equals('bar'));
expect(app.Foo.name, equals('bar'));
});
});
}