public void GivenASingleSchool_WhenCalled_ReturnsTheSchoolInTheSamePlace() { var coordinate = new Coordinate(50, 50); var schools = new List<School> {new School {Location = coordinate}}; var schoolShifter = new SchoolShifterService(); List<School> shiftedSchools = schoolShifter.Shift(schools); Assert.That(shiftedSchools.Count(),Is.EqualTo(1)); Assert.That(shiftedSchools[0].Location, Is.EqualTo(coordinate)); }
public void GivenTwoSchoolsWithTheSameLocation_WhenCalled_ReturnsTwoSchoolsWithTheLatitudeOfTheSecondChanged() { var coordinate = new Coordinate(50, 50); var schools = new List<School> { new School {SchoolName = "SchoolA", Location = coordinate}, new School() {SchoolName = "SchoolB", Location = coordinate} }; var schoolShifter = new SchoolShifterService(); List<School> shiftedSchools = schoolShifter.Shift(schools); Assert.That(shiftedSchools.Count(), Is.EqualTo(2)); Assert.That(shiftedSchools[0].Location,Is.EqualTo(coordinate)); Assert.That(shiftedSchools[1].Location,Is.Not.EqualTo(coordinate)); Assert.That(shiftedSchools[1].Location.Longitude, Is.EqualTo(50.00100M)); }