2using System.Collections.Generic;
7using Microsoft.VisualStudio.TestTools.UnitTesting;
20 Assert.IsTrue(viewModel.Model.Count() == 0);
22 Assert.IsTrue(viewModel.Model.Count() == 1);
24 Assert.IsTrue(viewModel.Model.Count() == 2);
35 Assert.IsTrue(viewModel.Model.Count() == 0);
37 Assert.IsTrue(viewModel.Model.Count() == 1);
39 Assert.IsTrue(viewModel.Model.Count() == 2);
49 Assert.IsTrue(viewModel.CanCreateObject);
50 Assert.IsTrue(viewModel.CanGetObject);
51 Assert.IsTrue(viewModel.CanDeleteObject);
52 Assert.IsTrue(viewModel.CanEditObject);
55 Assert.IsTrue(viewModel.CanCreate);
56 Assert.IsTrue(viewModel.CanFetch);
57 Assert.IsFalse(viewModel.CanSave);
58 Assert.IsFalse(viewModel.CanDelete);
64 var oldSetting = Configuration.ConfigurationManager.AppSettings[
"CslaSerializationFormatter"];
67 Configuration.ConfigurationManager.AppSettings.Set(
"CslaSerializationFormatter",
"MobileFormatter");
69 var root = BasicModern.Root.NewRoot();
73 viewModel.
Model = root;
74 viewModel.Model.Name =
"root";
76 var child = viewModel.Model.Children.AddNew();
81 Assert.IsNull(viewModel.Error);
85 Configuration.ConfigurationManager.AppSettings.Set(
"CslaSerializationFormatter", oldSetting);
void ViewModel_DoAddNew_WithBindingListModel()
void ViewModel_CheckAccess_WithNoListModel()
void ViewModel_DoAddNew_WithBusinessBindingListModel()
void ViewModelBaseDoSaveWorksWithMobileFormatter()
Arguments passed to a method invoked by the Execute trigger action.
T Model
Gets or sets the Model object.
static TestBindingList NewEditableList()
static TestBusinessBindingList NewEditableList()