Esempio n. 1
0
        public void ArticleDocTypeTest_One_Tab_On_DocType()
        {
            //Arrange
            var dt = new ArticleDocType();

            //Act

            //Assert
            Assert.AreEqual(1, dt.AttributeSchema.AttributeGroupDefinitions.Count);
        }
Esempio n. 2
0
        public void ArticleDocTypeTest_ArticleDocType_Is_Allowed_Child()
        {
            //Arrange
            var dt = new ArticleDocType();

            //Act

            //Assert
            Assert.IsTrue(dt.GraphSchema.PermittedDescendentTypes.IsRegistered <IEntityTypeDefinition, ArticleDocType>());
            Assert.IsTrue(dt.GraphSchema.PermittedDescendentTypes.IsRegistered(typeof(ArticleDocType)));
            //TODO: You can do this with Contains and the ID of the docType but that doesn't seem right, you should be able to do it off types IMO
        }
Esempio n. 3
0
        public void ArticleDocTypeTest_One_Property_On_DocType()
        {
            //Arrange
            var dt = new ArticleDocType();
            //Act

            //Assert
            var properties = from tab in dt.AttributeSchema.AttributeGroupDefinitions
                             from p in tab.AttributeDefinitions
                             select p;

            Assert.AreEqual(1, properties.Count());
        }