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()); }
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); }