| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library metamodel_test; | 5 library metamodel_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 | 10 |
| 11 import 'package:gcloud/datastore.dart'; | 11 import 'package:gcloud/datastore.dart'; |
| 12 import 'package:gcloud/datastore.dart' show Key, Query, Partition; | 12 import 'package:gcloud/datastore.dart' show Key, Partition; |
| 13 import 'package:gcloud/db.dart' as db; | 13 import 'package:gcloud/db.dart' as db; |
| 14 import 'package:gcloud/db/metamodel.dart'; | 14 import 'package:gcloud/db/metamodel.dart'; |
| 15 | 15 |
| 16 List<Entity> buildEntitiesWithDifferentNamespaces() { | 16 List<Entity> buildEntitiesWithDifferentNamespaces() { |
| 17 newKey(String namespace, String kind, int id) { | 17 newKey(String namespace, String kind, int id) { |
| 18 var partition = new Partition(namespace); | 18 var partition = new Partition(namespace); |
| 19 return new Key([new KeyElement(kind, id)], partition: partition); | 19 return new Key([new KeyElement(kind, id)], partition: partition); |
| 20 } | 20 } |
| 21 | 21 |
| 22 newEntity(String namespace, String kind, {int id: 1}) { | 22 newEntity(String namespace, String kind, {int id: 1}) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return Future.wait(futures).then((_) { | 96 return Future.wait(futures).then((_) { |
| 97 expect(datastore.commit(deletes: keys), completes); | 97 expect(datastore.commit(deletes: keys), completes); |
| 98 }); | 98 }); |
| 99 }); | 99 }); |
| 100 }); | 100 }); |
| 101 }); | 101 }); |
| 102 }); | 102 }); |
| 103 }); | 103 }); |
| 104 } | 104 } |
| 105 | 105 |
| OLD | NEW |