public void OpenStreamReturnsSingleAssetOpenStreamResult() { var bundle = new TestableBundle("~"); var asset = new Mock <IAsset>(); using (var stream = new MemoryStream()) { asset.Setup(a => a.OpenStream()).Returns(stream); bundle.Assets.Add(asset.Object); var actualStream = bundle.OpenStream(); actualStream.ShouldBeSameAs(stream); } }
public void OpenStreamReturnsSingleAssetOpenStreamResult() { var bundle = new TestableBundle("~"); var asset = new Mock<IAsset>(); using (var stream = new MemoryStream()) { asset.Setup(a => a.OpenStream()).Returns(stream); bundle.Assets.Add(asset.Object); bundle.Process(new CassetteSettings("")); var actualStream = bundle.OpenStream(); actualStream.ShouldBeSameAs(stream); } }