Ejemplo n.º 1
0
        public void CalculatePath_ReturnsValue(double lat1, double long1, double lat2, double long2, double result)
        {
            Position          a             = new Position(lat1, long1);
            Position          b             = new Position(lat2, long2);
            LatLongCalculator pathCalulator = new LatLongCalculator();

            Assert.AreEqual(result, pathCalulator.CalculatePath(a, b), 0.5);
        }
Ejemplo n.º 2
0
        public void CalculatePath_IncorrectParameters_Throws(double lat1, double long1, double lat2, double long2)
        {
            Position          a = new Position(lat1, long1);
            Position          b = new Position(lat2, long2);
            LatLongCalculator pathCalculator = new LatLongCalculator();

            Assert.Throws <ArgumentOutOfRangeException>(() => pathCalculator.CalculatePath(a, b));
        }