public void Test()
        {
            using (var writeable = new WriteableDataLocationTmp())
            {
                using (Stream outputStream = writeable.OutputStream)
                {
                    Assert.IsTrue(outputStream.CanWrite);
                    outputStream.WriteByte(0x1);
                    outputStream.Flush();
                }

                using (Stream inputStream = writeable.InputStream)
                {
                    Assert.IsTrue(inputStream.CanRead);
                    int readByte = inputStream.ReadByte();
                    Assert.AreEqual(readByte,0x1);
                }
            }
        }
Пример #2
0
 public void TestWritableCtor2()
 {
     using (var doc = new WriteableDataLocationTmp())
     {
         using (var b = new SdmxXmlStream(doc, true))
         using (var readable = new SdmxXmlStream(b, true))
         {
             Assert.IsTrue(readable.HasWriter);
             Assert.IsNotNull(readable.Writer);
         }
     }
 }