コード例 #1
0
        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>());
        }
コード例 #2
0
        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>());
        }
コード例 #3
0
        public override Widget Resolve(ITdiTab tab)
        {
            var widget = base.Resolve(tab);

            if (widget != null)
            {
                return(widget);
            }

            return(gtkViewResolver.Resolve((DialogViewModelBase)tab));
        }