platform/test/util.dart

33 lines
633 B
Dart
Raw Normal View History

2016-04-18 03:27:23 +00:00
import 'package:angel_framework/angel_framework.dart';
import 'package:test/test.dart';
class Foo {
String name;
Foo(String this.name);
}
main() {
group('Utilities', () {
Angel angel;
setUp(() {
angel = new Angel();
});
tearDown(() {
angel = null;
});
test('can use app.properties like members', () {
angel.properties['hello'] = 'world';
angel.properties['foo'] = () => 'bar';
angel.properties['Foo'] = new Foo('bar');
expect(angel.hello, equals('world'));
expect(angel.foo(), equals('bar'));
expect(angel.Foo.name, equals('bar'));
});
});
2016-06-19 05:02:41 +00:00
}