private static void ClassInitialize_Api()
 {
     _testContext.Properties.Add(
         "apiDataRows",
         new Dictionary <BillPaymentsClient, ApiPresets>
     {
         {
             BillPaymentsClientFactory.Create(Config.MerchantSecretKey),
             new ApiPresets
             {
                 Bills   = new List <BillResponse>(),
                 Refunds = new List <RefundResponse>()
             }
         },
         {
             BillPaymentsClientFactory.Create(
                 Config.MerchantSecretKey,
                 null,
                 ObjectMapperFactory.Create <NewtonsoftMapper>()
                 ),
             new ApiPresets
             {
                 Bills   = new List <BillResponse>(),
                 Refunds = new List <RefundResponse>()
             }
         }
     }
         );
 }
예제 #2
0
 public static BillPaymentsClient Create(
     string secretKey,
     IClient client             = null,
     IObjectMapper objectMapper = null,
     IFingerprint fingerprint   = null
     )
 {
     return(new BillPaymentsClient(
                secretKey,
                new RequestMappingIntercessor(
                    client ?? ClientFactory.Create(),
                    objectMapper ?? ObjectMapperFactory.Create()
                    ),
                fingerprint ?? FingerprintFactory.Create()
                ));
 }
예제 #3
0
 private static void ClassInitialize_Fake()
 {
     _testContext.Properties.Add(
         "fakeDataRows",
         new Dictionary <BillPaymentsClient, FakeApiPresets>(
             new[]
     {
         new FakeClient(ObjectMapperFactory.Create()),
         new FakeClient(ObjectMapperFactory.Create <NewtonsoftMapper>())
     }
             .Select(fakeClient => new KeyValuePair <BillPaymentsClient, FakeApiPresets>(
                         BillPaymentsClientFactory.Create(Config.MerchantSecretKey, fakeClient,
                                                          fakeClient.ObjectMapper),
                         new FakeApiPresets
     {
         Client  = fakeClient,
         Bills   = new List <BillResponse>(),
         Refunds = new List <RefundResponse>()
     }
                         ))
             )
         );
 }