Example #1
0
        public void Get_Prices_Successfully()
        {
            var query = new FuelPricesQuery();
            var res   = query.ExecuteAsync().Result;

            Assert.NotEmpty(res);
        }
Example #2
0
        public async void Run(TimerInfo timer, TraceWriter log)
        {
            try
            {
                if (timer.IsPastDue)
                {
                    log.Info("Timer is running late");
                }
                log.Info($"Running job at {DateTime.Now}");
                var prices = await _query.ExecuteAsync();

                log.Info($"Prices: {prices}");
                _command.Execute(prices);
                log.Info("Inserted successfully");
            }
            catch (Exception e)
            {
                log.Error($"Error: {e}");
            }
            finally
            {
                log.Info("Exiting Run method");
            }
        }