Beispiel #1
0
        public void Test_AddDistanceDataToLocationDict()
        {
            var frontRoyal = "423";
            var celina     = "2911";

            locationController.locations.LocationDict.Add(frontRoyal, new Location());
            locationController.locations.LocationDict.Add(celina, new Location());

            var distanceData = new Dictionary <string, double>();

            distanceData.Add(frontRoyal, 600);
            distanceData.Add(celina, 591);

            locationController.AddDistanceDataToLocationDict(distanceData);

            Assert.Equal(600, locationController.locations.LocationDict[frontRoyal].Distance);
            Assert.Equal(591, locationController.locations.LocationDict[celina].Distance);
        }