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);
        }
Example #2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var commonService = (ICommonService)UnityInstanceProvider.GetInstance(typeof(ICommonService));

            new MainWindow().ShowDialog();
        }