internal void VirusDoesNotInfectAlreadyInfectedCellsOrNullCells( InfectedCell infectedCellToInfect, NullCell nullCellToInfect, LyticVirus sut) { var result = new List <ICell>(); var numberOfTries = (int)Ceiling(InfectionFailureRate * 3 * 10); for (int currentTry = 0; currentTry < numberOfTries; currentTry++) { result.Add(sut.InfectCell(infectedCellToInfect).Clone()); result.Add(sut.InfectCell(nullCellToInfect).Clone()); } VerifyNoNewlyInfectedCellsArePresent(result, numberOfTries); }
internal void VirusCanInfectHealthyCellsInOneOutOfTenTimes( HealthyCell cellToInfect, LyticVirus sut) { var result = new List <ICell>(); var numberOfTries = (int)Ceiling(InfectionFailureRate * 3 * 10); for (int currentTry = 0; currentTry < numberOfTries; currentTry++) { result.Add(sut.InfectCell(cellToInfect).Clone()); } VerifyAtLeastOneCellGotInfected(result); }