public void ShouldCallToResolveWhenCallingToGetInstance() { var unityInstanceProvider = new UnityInstanceProvider(this.container, typeof(object)); Assert.IsFalse(this.container.ResolveCalled); unityInstanceProvider.GetInstance(null, null); Assert.IsTrue(this.container.ResolveCalled); }
private void Application_Startup(object sender, StartupEventArgs e) { var commonService = (ICommonService)UnityInstanceProvider.GetInstance(typeof(ICommonService)); new MainWindow().ShowDialog(); }