|
using Bddify.Core;
using NUnit.Framework;
namespace Bddify.Samples.TicTacToe
{
public class XWins : GameUnderTest
{
[RunStepWithArgs(
new[] { X, X, O },
new[] { X, X, O },
new[] { O, O, N },
StepTextTemplate = BoardStateTemplate)]
void GivenTheFollowingBoard(string[] firstRow, string[] secondRow, string[] thirdRow)
{
Game = new Game(firstRow, secondRow, thirdRow);
}
void WhenXPlaysInTheBottomRight()
{
Game.PlayAt(2, 2);
}
void ThenTheWinnerShouldBeX()
{
Assert.AreEqual(X, Game.Winner);
}
}
}
|
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.