Ejemplo n.º 1
0
        public void IfCharacterCanUseShieldThanPass()
        {
            var config = new MemoryStore();

            config.SetValue("armor", "shield");
            var prof = new ArmorProficiencyPrerequisite(config);

            var bob = CharacterTestTemplates.AverageBob();

            Assert.False(prof.IsQualified(bob.Components));
            bob.Add(new ArmorProficiency("shield"));
            Assert.True(prof.IsQualified(bob.Components));
        }
Ejemplo n.º 2
0
        public void IfFlagNotProficientItPassesIfNotProficientAndFailsIfProficient()
        {
            var config = new MemoryStore();

            config.SetValue("armor", "shield");
            config.SetValue("not-proficient", true);
            var prof = new ArmorProficiencyPrerequisite(config);

            var bob = CharacterTestTemplates.AverageBob();

            Assert.True(prof.IsQualified(bob.Components));
            bob.Add(new ArmorProficiency("shield"));
            Assert.False(prof.IsQualified(bob.Components));
        }