public static async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", Route = "prefixDictionary")] HttpRequest req, ILogger log) { var connectionString = Environment.GetEnvironmentVariable("TrendingGiphyBotConnectionString"); var logWrapper = new LoggerWrapper(log); using (var context = new TrendingGiphyBotContext(connectionString)) { var getPrefixDictionaryHelper = new GetPrefixDictionaryHelper(logWrapper, context); return(await getPrefixDictionaryHelper.RunAsync()); } }
public void SetUp() { _Log = new Mock <ILoggerWrapper>(); _Context = new Mock <ITrendingGiphyBotContext>(); _GetPrefixDictionaryHelper = new GetPrefixDictionaryHelper(_Log.Object, _Context.Object); }