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)); }
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)); }
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)); }