示例#1
0
        public void Data_NullDatabaseTestLoader()
        {
            ILoader loader = new NullDatabaseTestLoader();
            ViewModelBaseTestImplementation v = new ViewModelBaseTestImplementation(loader);

            Assert.IsNull(v.Data);
        }
示例#2
0
        public void Data()
        {
            ILoader loader = new DatabaseWithNoSchemasTestLoader(); //Only database level of metadata hierarchy matters for this test
            ViewModelBaseTestImplementation v = new ViewModelBaseTestImplementation(loader);

            Assert.IsNotNull(v.Data);
            Assert.AreEqual(loader.Load().Name, v.Data.Name); //Loader and viewmodel are in sync
            Assert.AreEqual(loader.Load().Id, v.Data.Id);
        }
示例#3
0
 public void Data_LoaderIsNull()
 {
     ViewModelBaseTestImplementation v = new ViewModelBaseTestImplementation(null);
     Database d = v.Data; //null loader cannot load anything and blows up
 }