Exemplo n.º 1
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);
        }