| OLD | NEW |
| 1 library pubspec_test; | 1 library pubspec_test; |
| 2 import 'dart:async'; | 2 import 'dart:async'; |
| 3 import 'package:pub_semver/pub_semver.dart'; |
| 3 import 'package:unittest/unittest.dart'; | 4 import 'package:unittest/unittest.dart'; |
| 4 import '../lib/src/package.dart'; | 5 import '../lib/src/package.dart'; |
| 5 import '../lib/src/pubspec.dart'; | 6 import '../lib/src/pubspec.dart'; |
| 6 import '../lib/src/source.dart'; | 7 import '../lib/src/source.dart'; |
| 7 import '../lib/src/source_registry.dart'; | 8 import '../lib/src/source_registry.dart'; |
| 8 import '../lib/src/version.dart'; | |
| 9 import 'test_pub.dart'; | 9 import 'test_pub.dart'; |
| 10 class MockSource extends Source { | 10 class MockSource extends Source { |
| 11 final String name = "mock"; | 11 final String name = "mock"; |
| 12 Future<Pubspec> doDescribe(PackageId id) => | 12 Future<Pubspec> doDescribe(PackageId id) => |
| 13 throw new UnsupportedError("Cannot describe mock packages."); | 13 throw new UnsupportedError("Cannot describe mock packages."); |
| 14 Future get(PackageId id, String symlink) => | 14 Future get(PackageId id, String symlink) => |
| 15 throw new UnsupportedError("Cannot get a mock package."); | 15 throw new UnsupportedError("Cannot get a mock package."); |
| 16 Future<String> getDirectory(PackageId id) => | 16 Future<String> getDirectory(PackageId id) => |
| 17 throw new UnsupportedError("Cannot get the directory for mock packages."); | 17 throw new UnsupportedError("Cannot get the directory for mock packages."); |
| 18 dynamic parseDescription(String filePath, description, {bool fromLockFile: | 18 dynamic parseDescription(String filePath, description, {bool fromLockFile: |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 test("uses the key if the value is null", () { | 431 test("uses the key if the value is null", () { |
| 432 var pubspec = new Pubspec.parse(''' | 432 var pubspec = new Pubspec.parse(''' |
| 433 executables: | 433 executables: |
| 434 command: | 434 command: |
| 435 ''', sources); | 435 ''', sources); |
| 436 expect(pubspec.executables['command'], equals('command')); | 436 expect(pubspec.executables['command'], equals('command')); |
| 437 }); | 437 }); |
| 438 }); | 438 }); |
| 439 }); | 439 }); |
| 440 } | 440 } |
| OLD | NEW |