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)); }
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); }