Exemple #1
0
        public void Restrictions_CanBeRegistered()
        {
            registration.RestrictChildren("Hello");

            var definition = registration.AppendToDefinition(sourceDefinition);

            Assert.That(definition.AllowedChildFilters.OfType <RestrictChildrenAttribute>().Single().TemplateNames.Single(), Is.EqualTo("Hello"));
        }
        public void Restrictions_CanBeRegistered()
        {
            registration.RestrictChildren("Hello");
            registration.IsDefined = true;

            var definition = registration.Finalize();

            Assert.That(definition.AllowedChildFilters.OfType <RestrictChildrenAttribute>().Single().TemplateNames.Single(), Is.EqualTo("Hello"));
        }