public void TestDisable() { var client = base.CreateMockTestClientNullRequiredFieldsRequest("Mocks/recurring/disable-success.json"); var recurring = new Service.Recurring(client); var disableRequest = this.CreateDisableRequest(); var disableResult = recurring.Disable(disableRequest); Assert.AreEqual("[detail-successfully-disabled]", disableResult.Response); }
public void TestDisable803() { try { var client = base.CreateMockTestClientForErrors(422, "Mocks/recurring/disable-error-803.json"); var recurring = new Service.Recurring(client); var disableRequest = this.CreateDisableRequest(); var disableResult = recurring.Disable(disableRequest); Assert.Fail("Exception expected!"); } catch (Exception exception) { Assert.AreNotEqual(200, exception); } }