public void XmlObjects_ConvertClassToXml_PlayerShouldReturnValidXml() { Player player = new Player(); player.Name = "Goran"; player.Server = "ts19.travian.se"; Village v1 = new Village(); v1.Name = "village 1"; v1.Player = player; v1.Inhabitants = 100; player.Villages = new List<Village>(); player.Villages.Add(v1); string xml = XmlObjects.ConvertClassToXml<Player>(player); Assert.IsTrue(xml.Contains("<api")); }
public ApiRoot(Player player) : base() { this.Player = player; this.Villages = player.Villages; }