Exemple #1
0
        public void MapConcreteKeywordField()
        {
            IComponentPresentation cp = ComponentPresentationFactory.GetComponentPresentation("", "keyword");

            Assert.IsNotNull(cp);

            KeywordContainingModel vm = ViewModelFactory.BuildViewModel(cp) as KeywordContainingModel;

            Assert.IsNotNull(vm);

            KeywordModel km = vm.ConcreteKeyword;

            Assert.IsNotNull(km);

            Assert.IsTrue(km.Heading == "some heading");
        }
Exemple #2
0
        public void KeywordIdAsTcmUri()
        {
            IComponentPresentation cp = ComponentPresentationFactory.GetComponentPresentation("", "keyword");

            Assert.IsNotNull(cp);

            KeywordContainingModel vm = ViewModelFactory.BuildViewModel(cp) as KeywordContainingModel;

            Assert.IsNotNull(vm);

            KeywordModel km = vm.ConcreteKeyword;

            Assert.IsNotNull(km);

            Assert.IsNotNull(km.KeywordId, "KeywordId is not set");
        }