Пример #1
0
        public void TestTrack2Masked()
        {
            var tags = new EmvTags {
                { Tag.track2_eq_data, "4658545742527290d130520132101f".ToByteArray() }
            };
            var actual   = tags.ToString();
            var expected = "0x57   'track2_eq_data      ' = [******************************]";

            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void TestSingleItemToString()
        {
            var tags = new EmvTags();

            tags.AddBcd(Tag.tran_date, "100824");
            var expected = "0x9a   'tran_date           ' = [100824]";
            var actual   = tags.ToString();

            Assert.AreEqual(expected, actual);
        }
Пример #3
0
        public void TestApplPanMasked()
        {
            var tags = new EmvTags {
                { Tag.appl_pan, "1234567890123456".ToByteArray() }
            };
            var actual   = tags.ToString();
            var expected = "0x5a   'appl_pan            ' = [****************]";

            Assert.AreEqual(expected, actual);
        }
Пример #4
0
        public void TestTwoItemsToString()
        {
            var tags = new EmvTags();

            tags.AddBcd(Tag.tran_date, "100824");
            tags.AddBcd(Tag.term_county_code, "710");
            var expected = "0x9a   'tran_date           ' = [100824]" + Environment.NewLine +
                           "0x9f1a 'term_county_code    ' = [0710]";
            var actual = tags.ToString();

            Assert.AreEqual(expected, actual);
        }