|
using NUnit.Framework;
namespace Bddify.Samples.TicTacToe
{
public static class Helpers
{
public static void VerifyBoardState(this Game game, string[] firstRow, string[] secondRow, string[] thirdRow)
{
Assert.IsTrue(game.Equals(new Game(firstRow, secondRow, thirdRow)));
}
}
public class GameUnderTest
{
protected const string BoardStateTemplate = "Given the board rows looks like [{0}], [{1}] and [{2}]";
protected const string X = Game.X;
protected const string O = Game.O;
protected const string N = Game.N;
protected Game Game { get; set; }
}
public abstract class NewGame : GameUnderTest
{
protected void GivenANewGame()
{
Game = new Game();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.