| OLD | NEW |
| 1 library ng.tool.source_metadata_extractor_spec; | 1 library ng.tool.source_metadata_extractor_spec; |
| 2 | 2 |
| 3 import 'package:angular/tools/common.dart'; | 3 import 'package:angular/tools/common.dart'; |
| 4 import 'package:angular/tools/source_crawler_impl.dart'; | 4 import 'package:angular/tools/source_crawler_impl.dart'; |
| 5 import 'package:angular/tools/source_metadata_extractor.dart'; | 5 import 'package:angular/tools/source_metadata_extractor.dart'; |
| 6 import '../jasmine_syntax.dart'; | 6 import '../jasmine_syntax.dart'; |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
| 8 | 8 |
| 9 main() => describe('source_metadata_extractor', () { | 9 main() => describe('source_metadata_extarctor', () { |
| 10 it('should extract all attribute mappings including annotations', () { | 10 it('should extract all attribute mappings including annotations', () { |
| 11 var sourceCrawler = new SourceCrawlerImpl(['packages/']); | 11 var sourceCrawler = new SourceCrawlerImpl(['packages/']); |
| 12 var sourceMetadataExtractor = new SourceMetadataExtractor(); | 12 var sourceMetadataExtractor = new SourceMetadataExtractor(sourceCrawler); |
| 13 List<DirectiveInfo> directives = | 13 List<DirectiveInfo> directives = |
| 14 sourceMetadataExtractor | 14 sourceMetadataExtractor |
| 15 .gatherDirectiveInfo('test/io/test_files/main.dart', sourceCrawler); | 15 .gatherDirectiveInfo('test/io/test_files/main.dart'); |
| 16 | 16 |
| 17 expect(directives, hasLength(2)); | 17 expect(directives, hasLength(2)); |
| 18 | 18 |
| 19 DirectiveInfo info = directives.elementAt(1); | 19 DirectiveInfo info = directives.elementAt(1); |
| 20 expect(info.expressionAttrs, unorderedEquals(['expr', 'another-expression', | 20 expect(info.expressionAttrs, unorderedEquals(['expr', 'another-expression', |
| 21 'callback', 'two-way-stuff', 'exported-attr'])); | 21 'callback', 'two-way-stuff', 'exported-attr'])); |
| 22 expect(info.expressions, unorderedEquals(['attr', 'expr', | 22 expect(info.expressions, unorderedEquals(['attr', 'expr', |
| 23 'anotherExpression', 'callback', 'twoWayStuff', | 23 'anotherExpression', 'callback', 'twoWayStuff', |
| 24 'exported + expression'])); | 24 'exported + expression'])); |
| 25 }); | 25 }); |
| 26 }); | 26 }); |
| OLD | NEW |