public void ResolveIApplication()
 {
     IoC ioc = new IoC();
     IApplication application = ioc.Container.Resolve<IApplication>();
     Assert.That(application, Is.Not.Null);
     application.Dispose();
 }
        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);
        }
Beispiel #3
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (IoC ioc = new IoC())
            {
                ioc.Container.Resolve<IApplication>().Start();
            }
        }
        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);
        }
 public void EventAggregator()
 {
     IoC ioc = new IoC();
     Assert.That(ioc.EventAggregator, Is.Not.Null);
 }