示例#1
0
        public void Flush_Not_Supported()
        {
            ActionStream actionStream = new ActionStream(new StreamActions {
                Flush = null
            });

            Assert.Throws <NotSupportedException>(() => actionStream.Flush());
        }
示例#2
0
        public void Flush()
        {
            bool         flushed      = false;
            ActionStream actionStream = new ActionStream(new StreamActions {
                Flush = () => flushed = true
            });

            actionStream.Flush();

            Assert.True(flushed);
        }