public void ShouldPerformDecodeReceivedCodeword(DecoderTestCase testCase)
        {
            // When
            var actualInformationPolynomial = _decoder.Decode(testCase.N, testCase.K, testCase.DecodedCodeword, testCase.ErrorsCount);

            // Then
            Assert.Equal(testCase.Expected, actualInformationPolynomial);
        }
示例#2
0
        public void ShouldFindOriginalInformationWordAmongPossibleVariants(DecoderTestCase testCase)
        {
            // When
            var actualInformationPolynomial = _decoder.Decode(
                testCase.N,
                testCase.K,
                testCase.D,
                testCase.GeneratingPolynomial,
                testCase.DecodedCodeword,
                testCase.MinCorrectValuesCount
                );

            // Then
            Assert.Equal(testCase.Expected, actualInformationPolynomial);
        }