Exemplo n.º 1
0
        public void GetEncodedSize_ThrowsException_WhenInputSizeIsNegativeTest(int inputSize)
        {
            // arrange

            // act
            Action act = () => Sut.GetEncodedSize(inputSize);

            // assert
            act.Should().Throw <ArgumentOutOfRangeException>();
        }
Exemplo n.º 2
0
        public void GetEncodedSizeTest(int inputSize, int expectedOutput)
        {
            // arrange
            Span <byte> input = new byte[inputSize];

            // act
            var result = Sut.GetEncodedSize(input);

            // assert
            result.Should().Be(expectedOutput);
        }