public static void TestNotSupportedMethods() { using (V2AxCryptDataStream stream = V2AxCryptDataStream.Create(Stream.Null)) { long position; Assert.Throws <NotSupportedException>(() => position = stream.Position); Assert.Throws <NotSupportedException>(() => stream.Position = 0); Assert.That(stream.CanSeek, Is.False); long length; Assert.Throws <NotSupportedException>(() => length = stream.Length); Assert.Throws <NotSupportedException>(() => stream.SetLength(0)); Assert.Throws <NotSupportedException>(() => position = stream.Seek(0, SeekOrigin.Begin)); } }