public void Setup() { _RefreshableVM = new RefreshableVM() { Title = "Foo" }; }
public void LifetimeScoreDispose() { using (CompositeDisposable disposable = new CompositeDisposable()) { for (int x = 0; x < 10; x++) { ILifetimeScope scope = BuildScope(); for (int y = 0; y < 100; y++) { RefreshableVM refreshableVM = scope.Resolve <RefreshableVM>(new TypedParameter(typeof(ILifetimeScope), scope)); refreshableVM.RequestActivated(disposable); refreshableVM.Content = y.ToString(); } } } Assert.AreEqual(ViewModelBase.LifetimeScopeCounts, 0); }