Esempio n. 1
0
        public void WeatherInfoIsEmptyTest()
        {
            WeatherInfo wi = new WeatherInfo(1);

            int[] n = new int[7] {
                1, 2, 3, 4, 5, 6, 1
            };
            for (int i = 0; i < 24; i++)
            {
                wi.AddInfo("4/20/2016", i, n);
            }
            Assert.IsTrue(!wi.IsEmpty("4/20/2016"));
            Assert.IsTrue(wi.IsEmpty("4/21/2016"));
        }
Esempio n. 2
0
        public void AddWeatherInfoTest()
        {
            WeatherInfo wi = new WeatherInfo(1);

            int[] n = new int[7] {
                1, 2, 3, 4, 5, 6, 0
            };
            wi.AddInfo("4/20/2016", 0, n);
            int[] nCopy = wi.GetInfo("4/20/2016", 0);

            bool equal = true;

            for (int i = 0; i < 6; i++)
            {
                if (n[i] != nCopy[i])
                {
                    equal = false;
                }
            }
            Assert.IsTrue(equal);
        }