public void CanResolveClassNameWithDigitsTest()
        {
            var navigation = Substitute.For <INavigationManager>();
            var tab        = new NumberName123987TestViewModel(navigation);

            var resolver = new ClassNamesBaseGtkViewResolver(typeof(OneLevelTestView));
            var view     = resolver.Resolve(tab);

            Assert.That(view, Is.InstanceOf <NumberName123987TestView>());
        }
        public void CanResolveTwoLevelViewTest()
        {
            var navigation = Substitute.For <INavigationManager>();
            var tab        = new SecondTestClassViewModel(navigation);

            var resolver = new ClassNamesBaseGtkViewResolver(typeof(OneLevelTestView));
            var view     = resolver.Resolve(tab);

            Assert.That(view, Is.InstanceOf <SecondTestClassView>());
        }
Пример #3
0
        private static IGtkViewResolver CreateGtkResolver()
        {
            var namedResolver = new ClassNamesBaseGtkViewResolver(
                //typeof(RdlViewerView),
                typeof(SendMessageView),
                typeof(DeletionView),
                typeof(UpdateProcessView));

            var resolver = new RegisteredGtkViewResolver(namedResolver);

            resolver.RegisterView <JournalViewModelBase, JournalView>();
            return(resolver);
        }
Пример #4
0
 public BasedOnNameTDIResolver(params Assembly[] lookupAssemblies)
 {
     this.gtkViewResolver = new ClassNamesBaseGtkViewResolver(lookupAssemblies);
 }