public void testFlush() { var flushCnt = new int[1]; var mockout = new FlushCounterFailWriterStream(flushCnt); new PacketLineOut(mockout).Flush(); Assert.AreEqual(1, flushCnt[0]); }
public void testFlush() { var flushCnt = new int[1]; var mockout = new FlushCounterFailWriterStream(flushCnt); new SideBandOutputStream(SideBandOutputStream.CH_DATA, SideBandOutputStream.SMALL_BUF, mockout).Flush(); Assert.AreEqual(1, flushCnt[0]); }
public void testFlush() { var flushCnt = new int[1]; var mockout = new FlushCounterFailWriterStream(flushCnt); new SideBandOutputStream(SideBandOutputStream.CH_DATA, new PacketLineOut(mockout)).Flush(); Assert.AreEqual(0, flushCnt[0]); new SideBandOutputStream(SideBandOutputStream.CH_ERROR, new PacketLineOut(mockout)).Flush(); Assert.AreEqual(1, flushCnt[0]); new SideBandOutputStream(SideBandOutputStream.CH_PROGRESS, new PacketLineOut(mockout)).Flush(); Assert.AreEqual(2, flushCnt[0]); }