public void Test_against_reference_implementation(string inputData, ErrorCorrectionLevel errorCorrectionLevel, BitMatrix expectedMatrix)
        {
            QrEncoder encoder      = new QrEncoder(errorCorrectionLevel);
            BitMatrix resultMatrix = encoder.Encode(inputData).Matrix;

            expectedMatrix.AssertEquals(resultMatrix);
        }
Beispiel #2
0
        public void Test_against_DataSet(TriStateMatrix input, MaskPatternType patternType, BitMatrix expected)
        {
            Pattern pattern = new PatternFactory().CreateByType(patternType);

            BitMatrix result = input.Apply(pattern, ErrorCorrectionLevel.H);

            expected.AssertEquals(result);
        }
Beispiel #3
0
        public void Test_against_DataSet(TriStateMatrix input, MaskPatternType patternType, BitMatrix expected)
        {
            Pattern pattern = new PatternFactory().CreateByType(patternType);

            BitMatrix result = input.Apply(pattern, ErrorCorrectionLevel.H);

            expected.AssertEquals(result);
        }
 public void Test_against_csv_DataSet(string inputData, ErrorCorrectionLevel errorCorrectionLevel, BitMatrix expectedMatrix)
 {
     QrEncoder encoder = new QrEncoder(errorCorrectionLevel);
     BitMatrix resultMatrix = encoder.Encode(inputData).Matrix;
     expectedMatrix.AssertEquals(resultMatrix);
 }