예제 #1
0
        public void UpdateVehicleLocationHistory_WithTupleData_SetPropertyVehicleLocationHistory()
        {
            var newFakeGpsTuples = new List <Tuple <double, double> >
            {
                new Tuple <double, double> (0.123456, -1.123456),
                new Tuple <double, double> (1.123456, -2.123456),
                new Tuple <double, double> (2.123456, -3.123456),
                new Tuple <double, double> (3.123456, -4.123456),
                new Tuple <double, double> (4.123456, -5.123456)
            };

            _nodeFinder.UpdateVehicleLocationHistory(newFakeGpsTuples);

            var result = _nodeFinder.VehicleLocationHistory;

            Assert.Equal(newFakeGpsTuples[0].Item1, _nodeFinder.VehicleLocationHistory[0].Latitude);
            Assert.Equal(newFakeGpsTuples[0].Item2, _nodeFinder.VehicleLocationHistory[0].Longitude);
            Assert.Equal(newFakeGpsTuples[1].Item1, _nodeFinder.VehicleLocationHistory[1].Latitude);
            Assert.Equal(newFakeGpsTuples[1].Item2, _nodeFinder.VehicleLocationHistory[1].Longitude);
            Assert.Equal(newFakeGpsTuples[2].Item1, _nodeFinder.VehicleLocationHistory[2].Latitude);
            Assert.Equal(newFakeGpsTuples[2].Item2, _nodeFinder.VehicleLocationHistory[2].Longitude);
        }