public void Model_DriverPoints_Add_To_List_DriverPoints(int PointAmount, string Driver) { var points = new DriverPoints(Driver, PointAmount); List <DriverPoints> list = new List <DriverPoints>(); points.Add(list); Assert.AreEqual(Driver, points.GetBest(list)); }
private void LoadData() { var awSectlist = DataProvider.GetSectorList().GetAwaiter(); awSectlist.OnCompleted(() => { var collection = awSectlist.GetResult(); foreach (var item in collection) { Sectors.Add(item); } }); var awPointlist = DataProvider.GetDriverList().GetAwaiter(); awPointlist.OnCompleted(() => { var collection = awPointlist.GetResult(); foreach (var item in collection) { DriverPoints.Add(item); } }); Orders = new ObservableCollection <Order>(); Orders.Add(new Order() { Client = "Jon", TrafficPoints = new TrafficPoint[2] { new TrafficPoint { Address = "Фучика, 14б" }, new TrafficPoint { Address = "Кирова, 59" } } }); Orders.Add(new Order() { Client = "Bill", TrafficPoints = new TrafficPoint[2] { new TrafficPoint { Address = "Коммунаровская, 26" }, new TrafficPoint { Address = "Глинки, 2" } } }); Orders.Add(new Order() { Client = "Henry", TrafficPoints = new TrafficPoint[2] { new TrafficPoint { Address = "Карла маркса, 1" }, new TrafficPoint { Address = "Глинки, 2" } } }); }