OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 lock_file_test; | 5 library lock_file_test; |
6 | 6 |
7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
8 import 'package:yaml/yaml.dart'; | 8 import 'package:yaml/yaml.dart'; |
9 | 9 |
10 import '../../pub/lock_file.dart'; | 10 import '../lib/src/lock_file.dart'; |
11 import '../../pub/package.dart'; | 11 import '../lib/src/package.dart'; |
12 import '../../pub/source.dart'; | 12 import '../lib/src/source.dart'; |
13 import '../../pub/source_registry.dart'; | 13 import '../lib/src/source_registry.dart'; |
14 import '../../pub/utils.dart'; | 14 import '../lib/src/utils.dart'; |
15 import '../../pub/version.dart'; | 15 import '../lib/src/version.dart'; |
16 | 16 |
17 class MockSource extends Source { | 17 class MockSource extends Source { |
18 final String name = 'mock'; | 18 final String name = 'mock'; |
19 final bool shouldCache = false; | 19 final bool shouldCache = false; |
20 | 20 |
21 dynamic parseDescription(String filePath, String description, | 21 dynamic parseDescription(String filePath, String description, |
22 {bool fromLockFile: false}) { | 22 {bool fromLockFile: false}) { |
23 if (!description.endsWith(' desc')) throw new FormatException(); | 23 if (!description.endsWith(' desc')) throw new FormatException(); |
24 return description; | 24 return description; |
25 } | 25 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 'version': '3.2.1', | 177 'version': '3.2.1', |
178 'source': 'mock', | 178 'source': 'mock', |
179 'description': 'bar desc' | 179 'description': 'bar desc' |
180 } | 180 } |
181 } | 181 } |
182 })); | 182 })); |
183 }); | 183 }); |
184 }); | 184 }); |
185 }); | 185 }); |
186 } | 186 } |
OLD | NEW |