Пример #1
0
        public void IsZoneAllowedWorksAsExpected()
        {
            ItemDefinition definition = engine.Definitions.GetDefinition(typeof(ItemInZone1Or2));

            Assert.IsTrue(definition.IsAllowedInZone("Zone1"));
            Assert.IsTrue(definition.IsAllowedInZone("Zone2"));
            Assert.IsFalse(definition.IsAllowedInZone("Zone3"));
        }
Пример #2
0
        public void NoAllowedZones_DefaultsTo_AllZonesAllowed()
        {
            ItemDefinition menuDefinition = definitions.GetDefinition(typeof(DefinitionMenuItem));
            bool           isAllowed      = menuDefinition.IsAllowedInZone("NotQuiteTheZoneYouExpectedPunk");

            Assert.IsTrue(isAllowed, "Wasn't allowed in the zone.");
        }