Beispiel #1
0
        public void TestFindEmptyCovidDataCollection()
        {
            // ReSharper disable once CollectionNeverUpdated.Local
            var covidCollection = new CovidDataCollection();
            var covidStatistics = new CovidDataStatistics(covidCollection);

            Assert.ThrowsException <InvalidOperationException>(() =>
                                                               covidStatistics.FindNumberOfDaysForPositiveTestsGreaterThanThreshold(this.threshold));
        }
Beispiel #2
0
        public void TestFindThresholdLessThanZero()
        {
            // ReSharper disable once CollectionNeverUpdated.Local
            var covidCollection = new CovidDataCollection();
            var covidStatistics = new CovidDataStatistics(covidCollection);

            Assert.ThrowsException <ArgumentOutOfRangeException>(() =>
                                                                 covidStatistics.FindNumberOfDaysForPositiveTestsGreaterThanThreshold(-1));
        }
Beispiel #3
0
        public void TestFindARecordOnThreshold()
        {
            var covidCollection = new CovidDataCollection {
                this.record1,
                this.record2
            };
            var covidStatistics = new CovidDataStatistics(covidCollection);
            var result          = covidStatistics.FindNumberOfDaysForPositiveTestsGreaterThanThreshold(this.threshold);

            Assert.AreEqual(0, result);
        }