コード例 #1
0
        public void Flush_DoesNotThrow()
        {
            // Arrange
            var stream = new BufferedStream();

            // Act
            var ex = Record.Exception(() => stream.Flush());

            // Assert
            Assert.Null(ex);
        }
コード例 #2
0
        public void Dispose_DoesNotThrow()
        {
            // Arrange
            var stream = new BufferedStream();

            // Act
            stream.Flush();

            // Assert
            int sum = 0;

            foreach (byte b in stream.RawBytes)
            {
                sum += b;
            }

            Assert.Equal(sum, 0);
        }