コード例 #1
0
        public void ViewModelTemplateResolver_ViewModelType_ShouldReturnCorrectTemplate()
        {
            TestViewModel     model    = new TestViewModel();
            ITemplateResolver resolver = new ViewModelTemplateResolver();

            Assert.IsTrue(resolver.Resolve(model) == "Test");
        }
コード例 #2
0
        public void ViewModelTemplateResolver_ByInstance_ShouldReturnCorrectTemplate()
        {
            TestMailModel     model    = new();
            ITemplateResolver resolver = new ViewModelTemplateResolver();

            Assert.IsTrue(resolver.Resolve(model) == "Test");
        }
コード例 #3
0
        public void ViewModelTemplateResolver_ByType_ShouldReturnCorrectTemplate()
        {
            ITemplateResolver resolver = new ViewModelTemplateResolver();

            Assert.IsTrue(resolver.Resolve <TestMailModel>() == "Test");
        }