public void TestCloseBlob()
        {
            var factory = new WriteRandomAccessStreamFactory();
            Func<string, Stream> func = name => new MemoryStream(Encoding.UTF8.GetBytes("I am a stream"));

            factory.CreateStream(func, null, Stubs.Blob1, Stubs.Blob1Length);

            factory.CloseBlob(Stubs.Blob1);
        }
        public void TestCreateStreamGetSameStreamBlob()
        {
            var factory = new WriteRandomAccessStreamFactory();
            Func<string, Stream> func = name => new MemoryStream(Encoding.UTF8.GetBytes("I am a stream"));

            var stream1 = factory.CreateStream(func, null, Stubs.Blob1, Stubs.Blob1Length);
            var stream2 = factory.CreateStream(func, null, Stubs.Blob1, Stubs.Blob1Length);

            Assert.AreEqual(stream1, stream2);
        }
        public void TestCloseBlobException()
        {
            var factory = new WriteRandomAccessStreamFactory();
            Func<string, Stream> func = name => new MemoryStream(Encoding.UTF8.GetBytes("I am a stream"));

            factory.CreateStream(func, null, Stubs.Blob1, Stubs.Blob1Length);

            factory.CloseBlob(Stubs.Blob1);
            Assert.Throws<StreamNotFoundException>(() => factory.CloseBlob(Stubs.Blob2));
        }