Esempio n. 1
0
        public void SetUp()
        {
            var repository = new RaceYamlGateway(RaceYamlFile.ParseYaml());
            var races      = repository.All();

            dwarf    = races.First(x => x.Name == "Dwarf");
            elf      = races.First(x => x.Name == "Elf");
            halfling = races.First(x => x.Name == "Halfling");
            human    = races.First(x => x.Name == "Human");
        }
Esempio n. 2
0
        public RaceTests()
        {
            var data  = RaceYamlFile.ParseYaml();
            var races = new List <Race>();

            foreach (var r in data.Children)
            {
                races.Add(new Race(r));
            }

            dwarf    = races.First(x => x.Name == "Dwarf");
            elf      = races.First(x => x.Name == "Elf");
            halfling = races.First(x => x.Name == "Halfling");
            human    = races.First(x => x.Name == "Human");
        }