Ejemplo n.º 1
0
        public void MatchesBasedOnNameIfNotTrainingLevel()
        {
            var prof  = new ArmorProficiency("Hide");
            var armor = new Armor();

            armor.Name = "Leather";
            Assert.IsFalse(prof.IsProficient(armor));
            armor.Name = "Hide";
            Assert.IsTrue(prof.IsProficient(armor));
        }
Ejemplo n.º 2
0
        public void ArmorTypesCanBeDefinedAsProficieny()
        {
            var prof  = new ArmorProficiency("Light");
            var armor = new Armor();

            armor.ArmorType = ArmorType.Light;

            Assert.IsTrue(prof.IsProficient(armor));
            armor.ArmorType = ArmorType.Heavy;

            Assert.IsFalse(prof.IsProficient(armor));
        }
Ejemplo n.º 3
0
        public void CanLoadAYamlListThatProvidesProficiencyInformation()
        {
            var yaml  = @"---
armors: [light, medium]";
            var prof  = new ArmorProficiency(yaml.ParseYaml());
            var light = new Armor();

            light.ArmorType = ArmorType.Light;
            var medium = new Armor();

            medium.ArmorType = ArmorType.Medium;
            var heavy = new Armor();

            heavy.ArmorType = ArmorType.Heavy;
            Assert.True(prof.IsProficient(light));
            Assert.True(prof.IsProficient(medium));
            Assert.False(prof.IsProficient(heavy));
        }
Ejemplo n.º 4
0
 public EnumBase(ArmorProficiency armorProficiency)
 {
     Value = armorProficiency;
     Description = armorProficiency.Description();
 }