public void Generate_HMAC_For_Empty_DibsPost() { // Arrange var post = new DibsPost(); // Act string mac = post.GenerateHMAC(KEY); // Assert string expected = HMACGenerator.HashHMACHex(KEY, "acceptreturnurl=&amount=&callbackurl=&cancelreturnurl=¤cy=&language=&merchant=&orderid="); Assert.AreEqual(expected, mac); }
public void Genereate_HMAC_For_Test_DibsPost() { // Arrange var post = new DibsPost(); post.Test = "1"; // Act string mac = post.GenerateHMAC(KEY); // Assert string expected = HMACGenerator.HashHMACHex(KEY, "acceptreturnurl=&amount=&billingaddress=&billingemail=&billingfirstname=&billinglastname=&billingmobile=&billingpostalcode=&billingpostalplace=&callbackurl=&cancelreturnurl=¤cy=&language=&merchant=&orderId=&paytype=&test=1"); Assert.AreEqual(expected, mac); }