2019-02-14 19:23:37 +00:00
|
|
|
import 'package:angel_orm_test/angel_orm_test.dart';
|
2019-04-08 16:58:41 +00:00
|
|
|
import 'package:logging/logging.dart';
|
2019-02-14 18:36:53 +00:00
|
|
|
import 'package:test/test.dart';
|
2019-04-08 16:58:41 +00:00
|
|
|
import 'common.dart';
|
2019-02-14 18:36:53 +00:00
|
|
|
|
|
|
|
void main() {
|
2019-04-08 16:58:41 +00:00
|
|
|
Logger.root.onRecord.listen((rec) {
|
|
|
|
print(rec);
|
|
|
|
if (rec.error != null) print(rec.error);
|
|
|
|
if (rec.stackTrace != null) print(rec.stackTrace);
|
|
|
|
});
|
2019-02-14 19:23:37 +00:00
|
|
|
|
2019-04-08 16:58:41 +00:00
|
|
|
group('postgresql', () {
|
|
|
|
group('belongsTo',
|
|
|
|
() => belongsToTests(pg(['author', 'book']), close: closePg));
|
|
|
|
group(
|
|
|
|
'edgeCase',
|
|
|
|
() => edgeCaseTests(pg(['unorthodox', 'weird_join', 'song', 'numba']),
|
|
|
|
close: closePg));
|
|
|
|
group('enumAndNested',
|
|
|
|
() => enumAndNestedTests(pg(['has_car']), close: closePg));
|
|
|
|
group('hasMany', () => hasManyTests(pg(['tree', 'fruit']), close: closePg));
|
|
|
|
group('hasMap', () => hasMapTests(pg(['has_map']), close: closePg));
|
|
|
|
group('hasOne', () => hasOneTests(pg(['leg', 'foot']), close: closePg));
|
|
|
|
group(
|
|
|
|
'manyToMany',
|
|
|
|
() =>
|
|
|
|
manyToManyTests(pg(['user', 'role', 'user_role']), close: closePg));
|
|
|
|
group('standalone', () => standaloneTests(pg(['car']), close: closePg));
|
2019-02-14 19:23:37 +00:00
|
|
|
});
|
|
|
|
}
|