예제 #1
0
        public void CacheViewChangingDoesNotCacheView()
        {
            PlatformProvider.Instance = provider;

            TestViewModel vm = new TestViewModel();

            object view = new object();
            vm.AttachView(view);

            Assert.IsNotNull(vm.GetView());

            vm.DisableCacheView();

            Assert.IsNull(vm.GetView());
        }
예제 #2
0
        public void AttachViewCallsViewLoadedAndViewReady()
        {
            PlatformProvider.Instance = provider;

            object loaded = null;
            object ready = null;

            TestViewModel vm = new TestViewModel();
            vm.Activate();

            vm.ViewLoadedPublic.Subscribe(x => loaded = x);
            vm.ViewReadyPublic.Subscribe(x => ready = x);

            object view = new object();
            vm.AttachView(view);

            Assert.IsNotNull(loaded);
            Assert.IsNotNull(ready);
        }