OLD | NEW |
1 library lock_file_test; | 1 library lock_file_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 'package:yaml/yaml.dart'; | 5 import 'package:yaml/yaml.dart'; |
5 import '../lib/src/lock_file.dart'; | 6 import '../lib/src/lock_file.dart'; |
6 import '../lib/src/package.dart'; | 7 import '../lib/src/package.dart'; |
7 import '../lib/src/pubspec.dart'; | 8 import '../lib/src/pubspec.dart'; |
8 import '../lib/src/source.dart'; | 9 import '../lib/src/source.dart'; |
9 import '../lib/src/source_registry.dart'; | 10 import '../lib/src/source_registry.dart'; |
10 import '../lib/src/version.dart'; | |
11 import 'test_pub.dart'; | 11 import 'test_pub.dart'; |
12 class MockSource extends Source { | 12 class MockSource extends Source { |
13 final String name = 'mock'; | 13 final String name = 'mock'; |
14 Future<Pubspec> doDescribe(PackageId id) => | 14 Future<Pubspec> doDescribe(PackageId id) => |
15 throw new UnsupportedError("Cannot describe mock packages."); | 15 throw new UnsupportedError("Cannot describe mock packages."); |
16 Future get(PackageId id, String symlink) => | 16 Future get(PackageId id, String symlink) => |
17 throw new UnsupportedError("Cannot get a mock package."); | 17 throw new UnsupportedError("Cannot get a mock package."); |
18 Future<String> getDirectory(PackageId id) => | 18 Future<String> getDirectory(PackageId id) => |
19 throw new UnsupportedError("Cannot get the directory for mock packages."); | 19 throw new UnsupportedError("Cannot get the directory for mock packages."); |
20 dynamic parseDescription(String filePath, String description, | 20 dynamic parseDescription(String filePath, String description, |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 'version': '3.2.1', | 184 'version': '3.2.1', |
185 'source': 'mock', | 185 'source': 'mock', |
186 'description': 'bar desc' | 186 'description': 'bar desc' |
187 } | 187 } |
188 } | 188 } |
189 })); | 189 })); |
190 }); | 190 }); |
191 }); | 191 }); |
192 }); | 192 }); |
193 } | 193 } |
OLD | NEW |