Updates to work with build
version 0.7.0.
New Features
- The
testBuilder
method now acceptsList<int>
values for both
sourceAssets
andoutputs
. - The
checkOutputs
method is now public.
Breaking Changes
- The
testBuilder
method now requires aRecordingAssetWriter
instead of
just anAssetWriter
for thewriter
parameter. - If a
Matcher
is provided as a value inoutputs
, then it will match against
the same value that was written. For example if your builder uses
writeAsString
then it will match against that string. If you use
writeAsBytes
then it will match against those bytes. It will not
automatically convert to/from bytes and strings. - Deleted the
makeAsset
andmakeAssets
methods. There is no moreAsset
class so these don't really have any value any more. - The signature of
addAssets
has changed to
void addAssets(Map<AssetId, dynamic> assets, InMemoryAssetWriter writer)
.
Values of the map may be eitherString
orList<int>
. InMemoryAssetReader#assets
andInMemoryAssetWriter#assets
have changed to
a type ofMap<AssetId, DatedValue>
from a type of
Map<AssetId, DatedString>
.DatedValue
has both astringValue
and
bytesValue
getter.InMemoryAssetReader
andInMemoryAssetWriter
have been updated to implement
the newAssetReader
andAssetWriter
interfaces (see thebuild
package
CHANGELOG for more details).InMemoryAssetReader#cacheAsset
has been changed to two separate methods,
void cacheStringAsset(AssetId id, String contents)
and
void cacheBytesAsset(AssetId id, List<int> bytes)
.- The
equalsAsset
matcher has been removed, since there is no moreAsset
class.