public void CoordinatesWithValidLatitudeAndLongitudeIsValid() { var coordinate = new Coordinate(50, 50); var wgs84Validator = new WGS84Validator(coordinate); Assert.True(wgs84Validator.IsValid); }
public void CoordinatesWithInvalidLatitudeIsInvalid() { var coordinate = new Coordinate(120,280); var wgs84Validator = new WGS84Validator(coordinate); Assert.False(wgs84Validator.IsValid); }
public void CircleWithValidCoordinatesIsValid() { var validCoordinate = new Coordinate(50, 50); var validCircle = new Circle(validCoordinate, 55); var circleValidator = new CircleValidator(validCircle); Assert.True(circleValidator.IsValid); }
public void AreaWithCircleWithInvalidCoordinatesIsInvalid() { var validCoordinate = new Coordinate(50, 50); var validCircle = new Circle(validCoordinate, 20); var area = new Area(); area.Circles.Add(validCircle); var circlesValidator = new CirclesValidator(area); Assert.True(circlesValidator.IsValid); }
public void CircleWithInvalidCoordinatesIsInvalid() { var invalidCoordinate = new Coordinate(400, 400); var invalidCircle = new Circle(invalidCoordinate, 14); var circleValidator = new CircleValidator(invalidCircle); Assert.False(circleValidator.IsValid); var errors = from error in circleValidator.Errors where error.GetType() == typeof(WGS84Error) select error; Assert.NotEmpty(errors); }