コード例 #1
0
        public void StartPage_IsntAllowed_BelowStartPage()
        {
            ItemDefinition startPageDef     = definitions.GetDefinition(typeof(DefinitionStartPage));
            var            childDefinitions = definitions.GetAllowedChildren(new DefinitionStartPage(), string.Empty, user);

            EnumerableAssert.DoesntContain(childDefinitions, startPageDef, "One of the start page's child definitions was the start page itself.");
        }
コード例 #2
0
        public void OneChildIsAllowed()
        {
            var allowed = definitions.GetAllowedChildren(new RestrictsChildWithCardinality()).Single();

            Assert.That(allowed.ItemType, Is.EqualTo(typeof(ChildWithCardinality)));
        }