diff --git a/test/CoreApi/FileSystemApiTest.cs b/test/CoreApi/FileSystemApiTest.cs index 9f9e04aa..507b2d78 100644 --- a/test/CoreApi/FileSystemApiTest.cs +++ b/test/CoreApi/FileSystemApiTest.cs @@ -112,6 +112,23 @@ public async Task Add_SizeChunking() Assert.AreEqual("hello world", text); } + [TestMethod] + public async Task StreamBehaviour() + { + var ipfs = TestFixture.Ipfs; + var options = new AddFileOptions + { + ChunkSize = 3, + Pin = true, + }; + var node = await ipfs.FileSystem.AddTextAsync("hello world", options); + var stream = await ipfs.FileSystem.ReadFileAsync(node.Id); + Assert.AreEqual(11, stream.Length); + Assert.IsTrue(stream.CanRead); + Assert.IsFalse(stream.CanWrite); + Assert.IsTrue(stream.CanSeek); + } + [TestMethod] public async Task Add_HashAlgorithm() {