コード例 #1
0
 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));
 }
コード例 #2
0
        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));
        }
コード例 #3
0
 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);
 }
コード例 #4
0
        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);
        }