public void TestDeleteMailingUnsuccessful() { IAuthorizationStrategy basicAuthStrategy = MockAuthStrategy(); IServiceCommunicator serviceCommunicator = MockServiceCommunicator(); IStamprApiClient stamprApiClient = new StamprApiClient.StamprApiClient("http://no", _username, _password, serviceCommunicator, basicAuthStrategy); Assert.Throws<ServiceCommunicationException>(() => stamprApiClient.DeleteMailing(1904)); }
public void TestDeleteMailingUnsuccessful() { IAuthorizationStrategy basicAuthStrategy = MockAuthStrategy(); IServiceCommunicator serviceCommunicator = MockServiceCommunicator(); IStamprApiClient stamprApiClient = new StamprApiClient.StamprApiClient("http://no", _username, _password, serviceCommunicator, basicAuthStrategy); Assert.Throws <ServiceCommunicationException>(() => stamprApiClient.DeleteMailing(1904)); }
public void TestDeleteMailing() { IAuthorizationStrategy basicAuthStrategy = MockAuthStrategy(); IServiceCommunicator serviceCommunicator = MockServiceCommunicator(); IStamprApiClient stamprApiClient = new StamprApiClient.StamprApiClient(_url, _username, _password, serviceCommunicator, basicAuthStrategy); bool result = stamprApiClient.DeleteMailing(1904); Assert.True(result); }