| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file | 
|  | 2 // for details. All rights reserved. Use of this source code is governed by a | 
|  | 3 // BSD-style license that can be found in the LICENSE file. | 
|  | 4 | 
|  | 5 library gcloud.db_impl_test; | 
|  | 6 | 
|  | 7 import 'dart:async'; | 
|  | 8 | 
|  | 9 import 'package:gcloud/db.dart'; | 
|  | 10 import 'package:unittest/unittest.dart'; | 
|  | 11 | 
|  | 12 | 
|  | 13 // These unused imports make sure that [ModelDBImpl.fromLibrary()] will find | 
|  | 14 // all the Model/ModelDescription classes. | 
|  | 15 import 'model_dbs/duplicate_kind.dart' as test1; | 
|  | 16 import 'model_dbs/duplicate_property.dart' as test2; | 
|  | 17 import 'model_dbs/multiple_annotations.dart' as test3; | 
|  | 18 import 'model_dbs/duplicate_fieldname.dart' as test4; | 
|  | 19 import 'model_dbs/no_default_constructor.dart' as test5; | 
|  | 20 | 
|  | 21 main() { | 
|  | 22   newModelDB(Symbol symbol)=> new ModelDBImpl.fromLibrary(symbol); | 
|  | 23 | 
|  | 24   group('model_db', () { | 
|  | 25     group('from_library', () { | 
|  | 26       test('duplicate_kind', () { | 
|  | 27         expect(new Future.sync(() { | 
|  | 28           newModelDB(#gcloud.db.model_test.duplicate_kind); | 
|  | 29         }), throwsA(isStateError)); | 
|  | 30       }); | 
|  | 31       test('duplicate_property', () { | 
|  | 32         expect(new Future.sync(() { | 
|  | 33           newModelDB(#gcloud.db.model_test.duplicate_property); | 
|  | 34         }), throwsA(isStateError)); | 
|  | 35       }); | 
|  | 36       test('multiple_annotations', () { | 
|  | 37         expect(new Future.sync(() { | 
|  | 38           newModelDB(#gcloud.db.model_test.multiple_annotations); | 
|  | 39         }), throwsA(isStateError)); | 
|  | 40       }); | 
|  | 41       test('duplicate_fieldname', () { | 
|  | 42         expect(new Future.sync(() { | 
|  | 43           newModelDB(#gcloud.db.model_test.duplicate_fieldname); | 
|  | 44         }), throwsA(isStateError)); | 
|  | 45       }); | 
|  | 46       test('no_default_constructor', () { | 
|  | 47         expect(new Future.sync(() { | 
|  | 48           newModelDB(#gcloud.db.model_test.no_default_constructor); | 
|  | 49         }), throwsA(isStateError)); | 
|  | 50       }); | 
|  | 51     }); | 
|  | 52   }); | 
|  | 53 } | 
| OLD | NEW | 
|---|