Esempio n. 1
0
        public static async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", Route = "jobconfigs/{channelid:decimal}")] HttpRequest req, decimal channelId, ILogger log)
        {
            var connectionString = Environment.GetEnvironmentVariable("TrendingGiphyBotConnectionString");
            var logWrapper       = new LoggerWrapper(log);

            using (var context = new TrendingGiphyBotContext(connectionString))
            {
                var getJobConfigHelper = new GetJobConfigHelper(logWrapper, context);
                return(await getJobConfigHelper.RunAsync(channelId));
            }
        }
Esempio n. 2
0
 public void SetUp()
 {
     _Log                = new Mock <ILoggerWrapper>();
     _Context            = new Mock <ITrendingGiphyBotContext>();
     _GetJobConfigHelper = new GetJobConfigHelper(_Log.Object, _Context.Object);
 }