Example #1
0
 public void ResolveIApplication()
 {
     IoC ioc = new IoC();
     IApplication application = ioc.Container.Resolve<IApplication>();
     Assert.That(application, Is.Not.Null);
     application.Dispose();
 }
Example #2
0
        public void ResolveView()
        {
            IoC ioc = new IoC();
            IEditorView  view = ioc.Container.Resolve<IEditorView>();
            Assert.That(view, Is.Not.Null);

            IEditorMenuView menuView = ioc.Container.Resolve<IEditorMenuView>();
            Assert.That(menuView, Is.Not.Null);
        }
Example #3
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (IoC ioc = new IoC())
            {
                ioc.Container.Resolve<IApplication>().Start();
            }
        }
Example #4
0
        public void ResolvePresenters()
        {
            IoC ioc = new IoC();
            IMainPresenter presenter = ioc.Container.Resolve<IMainPresenter>();
            Assert.That(presenter, Is.Not.Null);
            Assert.That(presenter.MainView, Is.TypeOf<EditorForm>());

            Assert.That(ioc.Container.Resolve<IMainPresenter>(), Is.TypeOf<EditorPresenter>());
            Assert.That(ioc.Container.Resolve<EditorMenuPresenter>(), Is.Not.Null);
        }
Example #5
0
 public void EventAggregator()
 {
     IoC ioc = new IoC();
     Assert.That(ioc.EventAggregator, Is.Not.Null);
 }