public void Cleanup() { _start = Point.Empty; _destination = Point.Empty; _positionChecker = null; _field = null; _systemUnderTest = null; }
public void Setup() { _start = new Point(1, 0); _destination = new Point(0, 1); _field = new Mock <IField>(); _positionChecker = new Mock <IPositionChecker>(); IAnimal[,] defaultAnimals = new IAnimal[2, 3]; _field.Setup(f => f.Width).Returns(3); _field.Setup(f => f.Heigth).Returns(2); _field.Setup(f => f.Animals).Returns(defaultAnimals); _systemUnderTest = new PointReplacer(_positionChecker.Object, _field.Object); }
public MovementHandler ( IPositionHandler positionHandler, IPointReplacer pointReplacer, IAnimalFinder animalFinder, IHealthHandler healthHandler, IField field ) { _field = field; _positionHandler = positionHandler; _pointReplacer = pointReplacer; _animalFinder = animalFinder; _healthHandler = healthHandler; }