public async Task<StripeResponse<Token>> CreatePiiToken(PiiTokenCreateArguments arguments, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest<PiiTokenCreateArguments, Token> { UrlPath = Paths.Tokens, Model = arguments }; return await _client.Post(request, cancellationToken); }
public async Task CreatePiiTokenTest() { // Arrange var args = new PiiTokenCreateArguments(); _stripe.Post( Arg.Is<StripeRequest<PiiTokenCreateArguments, Token>>( a => a.UrlPath == "tokens" && a.Model == args), _cancellationToken) .Returns(Task.FromResult(new StripeResponse<Token>())); // Act var response = await _client.CreatePiiToken(args, _cancellationToken); // Assert response.Should().NotBeNull(); }
public void Init() { _args = GenFu.GenFu.New<PiiTokenCreateArguments>(); }