public void TestSale_BadConnection() { var sale = new sale { id = "21321415412", orderId = "1556632727643", amount = 5000, orderSource = orderSourceType.androidpay, paypage = new cardPaypageType { paypageRegistrationId = "4005795464788715792" } }; Communications.DisposeHttpClient(); var config = new ConfigManager().getConfig(); config["proxyHost"] = "some-garbage"; config["proxyPort"] = "123"; var tempCnp = new CnpOnline(config); // Expect a WebException because an invalid proxy configuration is set Assert.Throws <WebException>(() => tempCnp.Sale(sale)); }
public void Dispose() { Communications.DisposeHttpClient(); }