| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 library barback.test.asset_test; |
| 6 |
| 7 import 'dart:async'; |
| 8 import 'dart:io'; |
| 9 |
| 10 import 'package:barback/barback.dart'; |
| 11 import 'package:unittest/unittest.dart'; |
| 12 |
| 13 import 'utils.dart'; |
| 14 |
| 15 main() { |
| 16 initConfig(); |
| 17 |
| 18 var id = new AssetId.parse("package|path/to/asset.txt"); |
| 19 |
| 20 group("Asset.fromFile", () { |
| 21 test("returns an asset with the given ID", () { |
| 22 var asset = new Asset.fromFile(id, new File("asset.txt")); |
| 23 expect(asset.id, equals(id)); |
| 24 }); |
| 25 }); |
| 26 |
| 27 group("Asset.fromPath", () { |
| 28 test("returns an asset with the given ID", () { |
| 29 var asset = new Asset.fromPath(id, "asset.txt"); |
| 30 expect(asset.id, equals(id)); |
| 31 }); |
| 32 }); |
| 33 |
| 34 group("Asset.fromString", () { |
| 35 test("returns an asset with the given ID", () { |
| 36 var asset = new Asset.fromString(id, "content"); |
| 37 expect(asset.id, equals(id)); |
| 38 }); |
| 39 }); |
| 40 } |
| OLD | NEW |