Example #1
0
        public void TestAllPropertiesSyncedWhenStorableLoaded()
        {
            DummyStorableVM viewModel = new DummyStorableVM();
            var             model     = new StorableBase();

            model.IsLoaded  = true;
            viewModel.Model = model;

            Assert.IsTrue(viewModel.SyncPreloadedCalled);
            Assert.IsTrue(viewModel.SyncLoadedCalled);
        }
Example #2
0
        public void TestOnlyPreloadedPropertiesSynced()
        {
            DummyStorableVM viewModel = new DummyStorableVM();
            var             model     = new StorableBase();

            model.IsLoaded  = false;
            viewModel.Model = model;

            Assert.IsTrue(viewModel.SyncPreloadedCalled);
            Assert.IsFalse(viewModel.SyncLoadedCalled);
        }