public void TestExChangeTrainStationFieldwithField() { Game game = new Game(new Player[] { new Player("XXX"), new Player("YYY") }); StreetField field1 = ((StreetField)game.Fields[1]); TrainstationField field5 = ((TrainstationField)game.Fields[5]); field1.Buy(game.Players[0]); field5.Buy(game.Players[1]); field5.ExchangeField(field5.Owner, game.Players[0], field1); Assert.That(field1.Owner.Name, Is.EqualTo(game.Players[1].Name)); Assert.That(field5.Owner.Name, Is.EqualTo(game.Players[0].Name)); }
public void TestExChangeTrainStationFieldMoney() { Game game = new Game(new Player[] { new Player("XXX"), new Player("YYY") }); TrainstationField field5 = ((TrainstationField)game.Fields[5]); field5.Buy(game.Players[0]); field5.ExchangeField(game.Players[0], game.Players[1], 60); Assert.That(game.Players[0].OwnerShip.Count(), Is.EqualTo(0)); Assert.That(game.Players[0].Money, Is.EqualTo(1500 - 200 + 60)); Assert.That(game.Players[1].OwnerShip[0].Name, Is.EqualTo(FieldNames.KingsCrossStation)); Assert.That(game.Players[1].Money, Is.EqualTo(1440)); Assert.That(field5.Owner.Name, Is.EqualTo(game.Players[1].Name)); }