This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Http.Features; | |
using Newtonsoft.Json.Linq; | |
namespace pr_demo_2019.Tests.Helpers | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class HttpRequestHelper | |
{ | |
public static HttpRequest CreateHttpRequest( | |
string method, | |
string uriString, | |
IHeaderDictionary headers = null, | |
object body = null) | |
{ | |
var uri = new Uri(uriString); | |
var request = new DefaultHttpContext().Request; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AccountEntity : BaseEntity | |
{ | |
[JsonProperty("account_number")] | |
public string AccountNumber { get; set; } | |
[JsonProperty("system_of_record")] | |
public string SystemOfRecord { get; set; } | |
[JsonProperty("phone_number")] | |
public string PhoneNumber { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RescheduleDateCalculateHttpTriggerTests : BaseTests | |
{ | |
[Fact] | |
public async void When_Trigger() | |
{ | |
// Arrange | |
var rescheduleDateCalculateOptions = | |
new RescheduleDateCalculateOptions(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BaseTests | |
{ | |
protected readonly ILogger _logger = LoggerHelper.CreateLogger(LoggerTypes.List); | |
protected readonly Faker _faker; | |
protected BaseTests() | |
{ | |
_faker = new Bogus.Faker(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CaseNumberGenerateHttpTriggerTests : BaseTests | |
{ | |
[Fact] | |
public void When_Trigger() | |
{ | |
// Arrange | |
var httpRequest = | |
HttpRequestHelper.CreateHttpRequest( | |
"POST", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class NextPaymentDateCalculateHttpTrigger | |
{ | |
[FunctionName("NextPaymentDateCalculateHttpTrigger")] | |
public async static Task<IActionResult> Run( | |
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "payments/calculate/nextpaymentdate")] HttpRequest req, | |
ILogger log) | |
{ | |
log.LogInformation("NextPaymentDateCalculateOptions function processed a request."); | |
var rescheduleDateCalculateOptions = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plaid = require('plaid'); | |
var moment = require('moment'); | |
var documentClient = require("documentdb").DocumentClient; | |
var PLAID_CLIENT_ID = '{Your Plaid Client Id}'; | |
var PLAID_SECRET = '{Your Plaid Secret}'; | |
var PLAID_PUBLIC_KEY = '{Your Plaid Public Key}'; | |
var PLAID_ENV = '{Plaid Enviorment: sandbox}'; | |
var ACCESS_TOKEN = '{Plaid Access Token from Quickstart}'; //The Access token can be retrieved from the Plaid Quickstart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This code is public domain. | |
The MurmurHash3 algorithm was created by Austin Appleby and put into the public domain. See http://code.google.com/p/smhasher/ | |
This C# variant was authored by | |
Elliott B. Edwards and was placed into the public domain as a gist | |
Status...Working on verification (Test Suite) | |
Set up to run as a LinqPad (linqpad.net) script (thus the ".Dump()" call) | |
*/ |