Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: pkg/barback/test/asset_test.dart

Issue 18650004: Make Assets know their ID. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak doc. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/test/asset_set_test.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « pkg/barback/test/asset_set_test.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698