public void Data_NullDatabaseTestLoader() { ILoader loader = new NullDatabaseTestLoader(); ViewModelBaseTestImplementation v = new ViewModelBaseTestImplementation(loader); Assert.IsNull(v.Data); }
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); }
public void Data_LoaderIsNull() { ViewModelBaseTestImplementation v = new ViewModelBaseTestImplementation(null); Database d = v.Data; //null loader cannot load anything and blows up }