public void List_Fill() { var fullList = new ComplexList(); var emptyList = new ComplexList(); emptyList.Clear(); Assert.IsTrue(emptyList.Count == 0); emptyList.FillRange(fullList); Assert.IsTrue(emptyList.Count == fullList.Count); }
public void Core_IList_FillRange() { var fullList = new ComplexList(); var emptyList = new ComplexList(); emptyList.Clear(); Assert.IsTrue(emptyList.Count == 0); emptyList.FillRange(fullList); Assert.IsTrue(emptyList.Count == fullList.Count); emptyList.Clear(); Assert.IsTrue(emptyList.Count == 0); emptyList.FillRange(fullList.Select(x => x)); Assert.IsTrue(emptyList.Count == fullList.Count); }
public HouseVM() { Validator = new Validator(); SaveCommand = new RelayCommand(Save); AddCommand = new RelayCommand(Add); _houseAdapter = new HouseAdapter(); _complexAdapter = new ComplexAdapter(); CurrentHouse = new House(); CurrentComplex = new Complex(); CurrentHouse.IdHouse = App.CurrentItemId; CurrentHouse = _houseAdapter.GetHouse(CurrentHouse); HouseList = _houseAdapter.GetAllHouseInComplex(); ComplexList = _complexAdapter.GetAllComplex(); CurrentComplex = ComplexList.FirstOrDefault( item => item.IdComplex == CurrentHouse.IdComplex); }