public void numOfHighestTest()
 {
     for (int i = 0; i <= 9; i++)
     {
         Assert.AreNotEqual(-1, query.numOfHighest(start, end, i));
     }
 }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            foreach (var series in chart1.Series)
            {
                series.Points.Clear();
            }

            for (int i = 0; i < 10; i++)
            {
                if (checkBox1.Checked && historyAcc.PriceAverage(DateTime.Now.AddHours(-24), DateTime.Now, i) != -1)
                {
                    chart1.Series[graphsList[0]].Points.AddXY(i, historyAcc.PriceAverage(DateTime.Now.AddHours(-24), DateTime.Now, i));
                }
                if (checkBox2.Checked && historyAcc.numOfHighest(DateTime.Now.AddHours(-24), DateTime.Now, i) != -1)
                {
                    chart1.Series[graphsList[1]].Points.AddXY(i, historyAcc.numOfHighest(DateTime.Now.AddHours(-24), DateTime.Now, i));
                }
                if (checkBox3.Checked && historyAcc.numOfLowest(DateTime.Now.AddHours(-24), DateTime.Now, i) != -1)
                {
                    chart1.Series[graphsList[2]].Points.AddXY(i, historyAcc.numOfLowest(DateTime.Now.AddHours(-24), DateTime.Now, i));
                }
            }
            myLogger.Info("User generate graph");
        }