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); }
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); }
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); }
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); }