Example #1
0
        public void DecodeText1NewLine(string newLine, bool extraNewLine)
        {
            Bill bill = SampleQRCodeText.CreateBillData1();

            TestHelper.NormalizeSourceBill(bill);
            Bill bill2 = QRBill.DecodeQrCodeText(SampleQRCodeText.CreateQrCodeText1(newLine) + (extraNewLine ? newLine : ""));

            TestHelper.NormalizeDecodedBill(bill2);
            Assert.Equal(bill, bill2);
        }
Example #2
0
        public void DecodeIgnoreMinorVersion()
        {
            Bill bill = SampleQRCodeText.CreateBillData1();

            TestHelper.NormalizeSourceBill(bill);
            string qrCodeText = SampleQRCodeText.CreateQrCodeText1();

            qrCodeText = qrCodeText.Replace("\n0200\n", "\n0201\n");
            Bill bill2 = QRBill.DecodeQrCodeText(qrCodeText);

            TestHelper.NormalizeDecodedBill(bill2);
            Assert.Equal(bill, bill2);
        }
        public void CreateText1()
        {
            Bill bill = SampleQRCodeText.CreateBillData1();

            Assert.Equal(SampleQRCodeText.CreateQrCodeText1(), QRBill.EncodeQrCodeText(bill));
        }