Exemple #1
0
 public WebHookControllerTest(DatabaseFixture fixture)
 {
     Context = fixture.DatabaseContext;
     Factory = new StubProviderApiFactory {
         OnRollback = dto => new OkObjectResult("OK")
     };
     Controller  = new WebHookController(Context, Factory);
     Transaction = SaveTransaction();
 }
Exemple #2
0
 public PaymentMethodLinkingTest(DatabaseFixture fixture)
 {
     Jaimito           = UserFactory.GetJaimito();
     Configuration     = Startup.Configuration;
     Context           = fixture.DatabaseContext;
     VisaProviderToken = Configuration["FakeProviderToken"];
     VisaProvider      = ProviderFactory.GetVisa();
     ApiFactory        = new StubProviderApiFactory {
         OnAssociation = conf => {
             if (conf.OperationTokenFromProvider.Equals(VisaProviderToken))
             {
                 return(new OkObjectResult("OK"));
             }
             return(new BadRequestObjectResult("BAD_REQUEST"));
         }
     };
     Setup();
     Controller = new PaymentMethodsController(Context, ApiFactory, GetClaimsExtractorFactoryFor(Jaimito));
 }