Exemple #1
0
        private async Task ShouldCancelMandateViaPPro()
        {
            var sepaResource = new SepaResource();

            _apiClient.Setup(apiClient =>
                             apiClient.Post <SepaResource>("ppro/sepa/mandates/id/cancel", _authorization, null,
                                                           CancellationToken.None, null))
            .ReturnsAsync(() => sepaResource);

            var sepaClient = new SepaClient(_apiClient.Object, _configuration.Object);

            var response = await sepaClient.CancelMandateViaPpro("id", CancellationToken.None);

            response.ShouldNotBeNull();
        }
Exemple #2
0
        private async Task ShouldGetMandateViaPpro()
        {
            var mandateResponse = new MandateResponse();

            _apiClient.Setup(apiClient =>
                             apiClient.Get <MandateResponse>("ppro/sepa/mandates/id", _authorization,
                                                             CancellationToken.None))
            .ReturnsAsync(() => mandateResponse);

            var sepaClient = new SepaClient(_apiClient.Object, _configuration.Object);

            var response = await sepaClient.GetMandateViaPpro("id", CancellationToken.None);

            response.ShouldNotBeNull();
        }