public void TestEmptyCovidDataCollection()
        {
            // ReSharper disable once CollectionNeverUpdated.Local
            var covidCollection = new CovidDataCollection();
            var statistics      = new CovidDataStatistics(covidCollection);

            Assert.ThrowsException <InvalidOperationException>(() => statistics.FindDayOfFirstPositiveTest());
        }
        public void TestOneItemCovidDataCollectionNoPositiveTest()
        {
            var record = new CovidRecord(DateTime.Now, "GA");

            var covidCollection = new CovidDataCollection {
                record
            };
            var statistics = new CovidDataStatistics(covidCollection);

            Assert.ThrowsException <InvalidOperationException>(() => statistics.FindDayOfFirstPositiveTest());
        }
        public void TestOneItemCovidDataCollectionOnePositiveTest()
        {
            var record = new CovidRecord(this.inputDate1, "GA")
            {
                PositiveTests = 1
            };
            var covidCollection = new CovidDataCollection {
                record
            };
            var statistics = new CovidDataStatistics(covidCollection);

            var result = statistics.FindDayOfFirstPositiveTest();

            Assert.AreEqual(this.inputDate1, result.Date);
        }
        public void TestMultipleItemCovidDataCollectionLastPlace()
        {
            var record1 = new CovidRecord(this.inputDate1, "GA");
            var record2 = new CovidRecord(this.inputDate2, "GA");
            var record3 = new CovidRecord(this.inputDate3, "GA")
            {
                PositiveTests = 1
            };

            var covidCollection = new CovidDataCollection {
                record1,
                record2,
                record3
            };

            var statistics = new CovidDataStatistics(covidCollection);

            var result = statistics.FindDayOfFirstPositiveTest();

            Assert.AreEqual(this.inputDate3, result.Date);
        }