OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 barback.test.asset_set_test; | 5 library barback.test.asset_set_test; |
6 | 6 |
7 import 'package:barback/barback.dart'; | 7 import 'package:barback/barback.dart'; |
8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
9 | 9 |
10 import 'utils.dart'; | 10 import 'utils.dart'; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 }); | 139 }); |
140 | 140 |
141 test("returns null when removing an asset not in the set", () { | 141 test("returns null when removing an asset not in the set", () { |
142 var set = new AssetSet(); | 142 var set = new AssetSet(); |
143 var foo = new Asset.fromString(fooId, "foo"); | 143 var foo = new Asset.fromString(fooId, "foo"); |
144 set.add(foo); | 144 set.add(foo); |
145 | 145 |
146 expect(set.removeId(barId), isNull); | 146 expect(set.removeId(barId), isNull); |
147 }); | 147 }); |
148 }); | 148 }); |
| 149 |
| 150 group(".ids", () { |
| 151 test("contains the ids of all the assets in the set", () { |
| 152 var set = new AssetSet(); |
| 153 var foo = new Asset.fromString(fooId, "foo"); |
| 154 var bar = new Asset.fromString(barId, "bar"); |
| 155 set.addAll([foo, bar]); |
| 156 expect(set.ids, unorderedEquals([fooId, barId])); |
| 157 }); |
| 158 }); |
149 } | 159 } |
OLD | NEW |