public void Setup() { m_PointOne = new Point3D(1, 1.0, 1.0, 1.0, "Point One"); m_PointTwo = new Point3D(2, 2.0, 2.0, 2.0, "Point Two"); m_Points = new[] { m_PointOne, m_PointTwo }; m_ShiftByPoint = new Point3D(-1, 1.0, 1.0, 1.0, "Shift By Point"); m_Repository = Substitute.For <IPointsRepository>(); m_Repository.All().Returns(m_Points); m_Calculator = Substitute.For <IShiftPointCalculator>(); m_Sut = new RepositoryPointsShifter(m_Calculator); }
public void Shift_ShiftsAllPoints_WhenCalled() { // Arrange IEnumerable <Point3D> expected = CreateExpectedShiftedPoints(); PointsRepository repository = CreateAndPopulatePointsRepository(); RepositoryPointsShifter sut = CreateSut(); // Act sut.Shift(repository, m_ShiftByPoint); // Assert NUnitHelper.AssertPoint3Ds(expected, repository.All()); }