private void LoadData() { CurrentCargoBorder = new CargoBorder(); VariableList = new List <string>(); List <Variable> variables = variableService.All(); variables.ForEach(v => VariableList.Add(v.Description)); }
public void TestVariableViewModel() { var viewmodel = new VariableViewModel(variableService); ObservableCollection <Variable> expectedData = new ObservableCollection <Variable>(variableService.All()); var variable = variableService.Find(1); viewmodel.SelectedVariable = variable; Assert.AreEqual(expectedData.Count, viewmodel.Variables.Count); Assert.IsNotNull(viewmodel.SelectedVariable); Assert.AreEqual(1, viewmodel.SelectedVariable.Variable_id); }
private void LoadData() { var dummy = service.All().OrderBy(d => d.Variable_id); Variables = new ObservableCollection <Variable>(dummy); }