public void TestPack() { var tags = new EmvTags { { Tag.appl_id, "a0000000031010".ToByteArray() }, { Tag.tran_date, "100824".ToByteArray() } }; byte[] expected = "9f0607a00000000310109a03100824".ToByteArray(); byte[] actual = tags.Pack(); CollectionAssert.AreEqual(expected, actual); }
public void TestPack() { var content = "9f02060000000010009f03060000000000004f07a0000000041010820258009f360200019f2608e4539ffffaa341db9f2701808e100000000000000000420341031e031f009f34034203009f10120212a0000f240000dac000000000000000ff9f3303e0f0c89f1a0202889f350122950500000480009f420208409a031106239f4104000000019c01009f37048202d9dc"; var tags = new EmvTags { { Tag.icc_request, content.ToByteArray() } }; var packed = tags.Pack(); var actual = packed.ToHex().Substring(0, 12); var expected = "FF2081919F02"; Assert.AreEqual(expected, actual); }