Exemple #1
0
        public void GenerateSummary()
        {
            var gap = new GasAzurePersistor(ConfigurationManager.ConnectionStrings["AzureWebJobsStorage"].ConnectionString);

            var startDate = new DateTime(2018, 08, 14);
            var endDate   = DateTime.UtcNow;

            foreach (var d in EachDay(startDate, endDate))
            {
                var l = gap.Get(d);

                gap.SaveSummary(l).Wait();

                var s = gap.GetSummary(d);

                Console.WriteLine($"OK: {d:d} (E: {s.EthGasPriceStandard} | R: {s.RSKMinGasPrice})");

                Assert.AreNotEqual(0, s.BtcVsUsd);
                Assert.AreNotEqual(0, s.EthGasPriceFast);
                Assert.AreNotEqual(0, s.EthGasPriceLow);
                Assert.AreNotEqual(0, s.EthGasPriceStandard);
                Assert.AreNotEqual(0, s.EthVsUsd);
                Assert.AreNotEqual(0, s.RSKMinGasPrice);
            }
        }
Exemple #2
0
 private GasMeasurement GetSummaryByDateFromStorage(DateTime d)
 {
     return(_gasAzurePersistor.GetSummary(d));
 }