public void LinksApprovalUrlPayNowTest() { var resource = new PayPalResourceObject { links = GetLinksList() }; var approvalUrl = resource.GetApprovalUrl(true); Assert.AreEqual("https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-0JP008296V451950C&useraction=commit", approvalUrl); }
public void LinksNoApprovalUrlTest() { var resource = new PayPalResourceObject { links = new List <Links> { GetLinks(false) } }; var approvalUrl = resource.GetApprovalUrl(); Assert.IsTrue(string.IsNullOrEmpty(approvalUrl)); }