Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }