Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Leonardi committed Jan 16, 2015
1 parent a4b1f6f commit 93a4131
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SCvUnitTest/GameBuilderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void TestNew(){
IPlayer p1 = new Player {Faction = FactionType.Elves, Name = "A", Score = 0};
IPlayer p2 = new Player {Faction = FactionType.Dwarves, Name = "B", Score = 0};
IPlayer p3 = new Player {Faction = FactionType.Orcs, Name = "C", Score = 0};
IGame g = GameBuilder.New(MapType.Demo, p1, p2);
IGame g = GameBuilder.New(MapType.Demo, (Player)p1, (Player)p2);

Assert.AreEqual(g.Map.Width, 6);
Assert.AreEqual(g.Map.Turns, 5);
Expand Down
17 changes: 11 additions & 6 deletions SCvUnitTest/GameTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,33 @@ public void TestGameCreation()
Assert.AreEqual(Game.Instance, game);
}

/*[TestMethod]
[TestMethod]
public void TestNextTurn()
{
Game game = new Game();
IPlayer p1 = new Player { Faction = FactionType.Elves, Name = "A", Score = 0 };
IPlayer p2 = new Player { Faction = FactionType.Dwarves, Name = "B", Score = 0 };
IGame game = GameBuilder.New(MapType.Demo, (Player)p1, (Player)p2);

game.NextTurn();
Assert.AreEqual(game.CurrentPlayerId, 1);
Assert.AreEqual(game.Turn,0);
game.NextTurn();
Assert.AreEqual(game.CurrentPlayerId, 1);
Assert.AreEqual(game.CurrentPlayerId, 0);
Assert.AreEqual(game.Turn, 1);
}*/
}

/* [TestMethod]
public void TestCalculateUnitStats()
{
Game game = new Game();
}*/

/*[TestMethod]
/* [TestMethod]
public void TestIsEnded()
{
IPlayer p1 = new Player { Faction = FactionType.Elves, Name = "A", Score = 0 };
IPlayer p2 = new Player { Faction = FactionType.Dwarves, Name = "B", Score = 0 };
IGame game = GameBuilder.New(MapType.Demo, (Player)p1, (Player)p2);
}*/
}
}

0 comments on commit 93a4131

Please sign in to comment.