Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: third_party/pkg/angular/test/core/registry_spec.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/test/core/registry_spec.dart
diff --git a/third_party/pkg/angular/test/core/registry_spec.dart b/third_party/pkg/angular/test/core/registry_spec.dart
index 532dbf1aeaa4e53f1bdbf8aa72919e0ae472d99f..f06241bf50c69dfbe45e93f9c9aa7680a875d305 100644
--- a/third_party/pkg/angular/test/core/registry_spec.dart
+++ b/third_party/pkg/angular/test/core/registry_spec.dart
@@ -1,46 +1,46 @@
library registry_spec;
import '../_specs.dart';
+import 'package:angular/application_factory.dart';
-main() => describe('RegistryMap', () {
- it('should allow for multiple registry keys to be added', () {
- var module = new Module()
- ..type(MyMap)
- ..type(MetadataExtractor)
- ..type(A1)
- ..type(A2);
+main() {
+ describe('RegistryMap', () {
+ it('should allow for multiple registry keys to be added', () {
+ var module = new Module()
+ ..type(MyMap)
+ ..type(A1)
+ ..type(A2);
- var injector = new DynamicInjector(modules: [module]);
- expect(() {
- injector.get(MyMap);
- }).not.toThrow();
- });
+ var injector = applicationFactory().addModule(module).createInjector();
+ expect(() {
+ injector.get(MyMap);
+ }).not.toThrow();
+ });
- it('should iterate over all types', () {
- var module = new Module()
- ..type(MyMap)
- ..type(MetadataExtractor)
- ..type(A1);
+ it('should iterate over all types', () {
+ var module = new Module()
+ ..type(MyMap)
+ ..type(A1);
- var injector = new DynamicInjector(modules: [module]);
- var keys = [];
- var types = [];
- var map = injector.get(MyMap);
- map.forEach((k, t) { keys.add(k); types.add(t); });
- expect(keys).toEqual([new MyAnnotation('A'), new MyAnnotation('B')]);
- expect(types).toEqual([A1, A1]);
- });
+ var injector = applicationFactory().addModule(module).createInjector();
+ var keys = [];
+ var types = [];
+ var map = injector.get(MyMap);
+ map.forEach((k, t) { keys.add(k); types.add(t); });
+ expect(keys).toEqual([new MyAnnotation('A'), new MyAnnotation('B')]);
+ expect(types).toEqual([A1, A1]);
+ });
- it('should safely ignore typedefs', () {
- var module = new Module()
- ..type(MyMap)
- ..type(MetadataExtractor)
- ..value(MyTypedef, (String _) => null);
+ it('should safely ignore typedefs', () {
+ var module = new Module()
+ ..type(MyMap)
+ ..value(MyTypedef, (String _) => null);
- var injector = new DynamicInjector(modules: [module]);
- expect(() => injector.get(MyMap), isNot(throws));
+ var injector = applicationFactory().addModule(module).createInjector();
+ expect(() => injector.get(MyMap), isNot(throws));
+ });
});
-});
+}
typedef void MyTypedef(String arg);
@@ -61,4 +61,4 @@ class MyAnnotation {
}
@MyAnnotation('A') @MyAnnotation('B') class A1 {}
-@MyAnnotation('A') class A2 {}
+@MyAnnotation('A') class A2 {}
« no previous file with comments | « third_party/pkg/angular/test/core/parser/static_parser_spec.dart ('k') | third_party/pkg/angular/test/core/scope_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698