Exemple #1
0
        public static async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "delete", 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 deleteJobConfigHelper = new DeleteJobConfigHelper(logWrapper, context);
                return(await deleteJobConfigHelper.RunAsync(channelId));
            }
        }
 public void SetUp()
 {
     _Log     = new Mock <ILoggerWrapper>();
     _Context = new Mock <ITrendingGiphyBotContext>();
     _DeleteJobConfigHelper = new DeleteJobConfigHelper(_Log.Object, _Context.Object);
 }