Example #1
0
        public void EvolvedVirusStrategy_Works(int totalBursts, int expectedInfectionBursts)
        {
            var virus = new VirusSimulator("day22testinput.txt", new EvolvedVirusStrategy());

            var actual = virus.InfectionBurstsAfterTotalBursts(totalBursts);

            Assert.Equal(expectedInfectionBursts, actual);
        }
Example #2
0
        public void VirusSimulator_SimpleStrategy_Works()
        {
            var virus = new VirusSimulator("day22testinput.txt", new SimpleVirusStrategy());

            var actual = virus.InfectionBurstsAfterTotalBursts(10000);

            Assert.Equal(5587, actual);
        }