public void Flush_Not_Supported() { ActionStream actionStream = new ActionStream(new StreamActions { Flush = null }); Assert.Throws <NotSupportedException>(() => actionStream.Flush()); }
public void Flush() { bool flushed = false; ActionStream actionStream = new ActionStream(new StreamActions { Flush = () => flushed = true }); actionStream.Flush(); Assert.True(flushed); }