platform/test/common.dart
thosakwe 0adfdbeb59 50
2017-01-27 22:47:00 -05:00

34 lines
622 B
Dart

library angel_framework.test.common;
import 'package:angel_framework/angel_framework.dart';
class Todo extends MemoryModel {
String text;
String over;
Todo({String this.text, String this.over});
}
class BookService extends Service {
@override
index([params]) async {
print('Book params: $params');
return [
{'foo': 'bar'}
];
}
}
incrementTodoTimes(e) {
IncrementService.TIMES++;
}
@Hooks(before: const [incrementTodoTimes])
class IncrementService extends Service {
static int TIMES = 0;
@override
@Hooks(after: const [incrementTodoTimes])
index([params]) async => [];
}