Esempio n. 1
0
        private void LoadData()
        {
            CurrentCargoBorder = new CargoBorder();
            VariableList       = new List <string>();
            List <Variable> variables = variableService.All();

            variables.ForEach(v => VariableList.Add(v.Description));
        }
Esempio n. 2
0
        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);
        }