|
|
@ -1,4 +1,5 @@
|
|
|
|
using Model.Dice;
|
|
|
|
using Data;
|
|
|
|
|
|
|
|
using Model.Dice;
|
|
|
|
using Model.Dice.Faces;
|
|
|
|
using Model.Dice.Faces;
|
|
|
|
using Model.Games;
|
|
|
|
using Model.Games;
|
|
|
|
using Model.Players;
|
|
|
|
using Model.Players;
|
|
|
@ -12,50 +13,26 @@ namespace Tests.Model_UTs.Games
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class GameTest
|
|
|
|
public class GameTest
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
private readonly GameRunner stubGameRunner = new Stub().LoadApp();
|
|
|
|
private static readonly string GAME_NAME = "my game";
|
|
|
|
private static readonly string GAME_NAME = "my game";
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly Player PLAYER_1 = new("Alice"), PLAYER_2 = new("Bob"), PLAYER_3 = new("Clyde");
|
|
|
|
private static readonly Player PLAYER_1 = new("Alice"), PLAYER_2 = new("Bob"), PLAYER_3 = new("Clyde");
|
|
|
|
|
|
|
|
private readonly IEnumerable<Die> DICE_1, DICE_2;
|
|
|
|
private readonly static NumberDieFace FACE_NUM = new(1);
|
|
|
|
public GameTest()
|
|
|
|
private readonly static ImageDieFace FACE_IMG = new(10);
|
|
|
|
|
|
|
|
private readonly static ColorDieFace FACE_CLR = new(1000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly static NumberDieFace[] FACES_1 = new NumberDieFace[]
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
FACE_NUM,
|
|
|
|
|
|
|
|
new(2),
|
|
|
|
|
|
|
|
new(3),
|
|
|
|
|
|
|
|
new(4)
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly static ImageDieFace[] FACES_2 = new ImageDieFace[]
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
FACE_IMG,
|
|
|
|
DICE_1 = stubGameRunner.GlobalDieManager.GetAll().First().Value;
|
|
|
|
new(20),
|
|
|
|
DICE_2 = stubGameRunner.GlobalDieManager.GetAll().Last().Value;
|
|
|
|
new(30),
|
|
|
|
}
|
|
|
|
new(40)
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly static ColorDieFace[] FACES_3 = new ColorDieFace[]
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
FACE_CLR,
|
|
|
|
|
|
|
|
new(2000),
|
|
|
|
|
|
|
|
new(3000),
|
|
|
|
|
|
|
|
new(4000)
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly AbstractDie<AbstractDieFace> NUM = new NumberDie(FACES_1), IMG = new ImageDie(FACES_2), CLR = new ColorDie(FACES_3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly IEnumerable<AbstractDie<AbstractDieFace>> DICE =
|
|
|
|
|
|
|
|
new List<AbstractDie<AbstractDieFace>>() { NUM, IMG, CLR }
|
|
|
|
|
|
|
|
.AsEnumerable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
[Fact]
|
|
|
|
public void TestNamePropertyGet()
|
|
|
|
public void TestNamePropertyGet()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
string actual = game.Name;
|
|
|
|
string actual = game.Name;
|
|
|
@ -68,9 +45,11 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestNamePropertySetWhenValidThenCorrect()
|
|
|
|
public void TestNamePropertySetWhenValidThenCorrect()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
string expected = "shitty marmot";
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string expected = "shitty marmot";
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
game.Name = expected;
|
|
|
|
game.Name = expected;
|
|
|
@ -90,7 +69,9 @@ namespace Tests.Model_UTs.Games
|
|
|
|
Game game;
|
|
|
|
Game game;
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
void action() => game = new(name: name, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
void action() => game = new(name: name,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
// Assert
|
|
|
|
// Assert
|
|
|
|
Assert.Throws<ArgumentException>(action);
|
|
|
|
Assert.Throws<ArgumentException>(action);
|
|
|
@ -100,12 +81,7 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestGetHistory()
|
|
|
|
public void TestGetHistory()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Dictionary<AbstractDie<AbstractDieFace>, AbstractDieFace> diceNFaces = new()
|
|
|
|
Dictionary<Die, Face> diceNFaces = (Dictionary<Die, Face>)stubGameRunner.GetAll().First().GetHistory().First().DiceNFaces;
|
|
|
|
{
|
|
|
|
|
|
|
|
{ CLR, FACE_CLR },
|
|
|
|
|
|
|
|
{ IMG, FACE_IMG },
|
|
|
|
|
|
|
|
{ NUM, FACE_NUM }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Turn turn1 = Turn.CreateWithDefaultTime(PLAYER_1, diceNFaces);
|
|
|
|
Turn turn1 = Turn.CreateWithDefaultTime(PLAYER_1, diceNFaces);
|
|
|
|
Turn turn2 = Turn.CreateWithDefaultTime(PLAYER_2, diceNFaces); // yeah they rolled the same
|
|
|
|
Turn turn2 = Turn.CreateWithDefaultTime(PLAYER_2, diceNFaces); // yeah they rolled the same
|
|
|
@ -113,7 +89,11 @@ namespace Tests.Model_UTs.Games
|
|
|
|
IEnumerable<Turn> expected = new List<Turn>() { turn1, turn2 };
|
|
|
|
IEnumerable<Turn> expected = new List<Turn>() { turn1, turn2 };
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE, expected);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1,
|
|
|
|
|
|
|
|
expected);
|
|
|
|
|
|
|
|
|
|
|
|
IEnumerable<Turn> actual = game.GetHistory();
|
|
|
|
IEnumerable<Turn> actual = game.GetHistory();
|
|
|
|
|
|
|
|
|
|
|
|
// Assert
|
|
|
|
// Assert
|
|
|
@ -124,12 +104,14 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestDicePropertyGet()
|
|
|
|
public void TestDicePropertyGet()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
IEnumerable<AbstractDie<AbstractDieFace>> actual = game.Dice;
|
|
|
|
IEnumerable<Die> actual = game.Dice;
|
|
|
|
IEnumerable<AbstractDie<AbstractDieFace>> expected = DICE;
|
|
|
|
IEnumerable<Die> expected = DICE_2;
|
|
|
|
|
|
|
|
|
|
|
|
// Assert
|
|
|
|
// Assert
|
|
|
|
Assert.Equal(expected, actual);
|
|
|
|
Assert.Equal(expected, actual);
|
|
|
@ -139,7 +121,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestPerformTurnDoesAddOneTurn()
|
|
|
|
public void TestPerformTurnDoesAddOneTurn()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
|
|
|
|
|
|
|
@ -167,7 +152,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestGetWhoPlaysNowWhenValidThenCorrect()
|
|
|
|
public void TestGetWhoPlaysNowWhenValidThenCorrect()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
|
|
|
|
|
|
|
@ -190,7 +178,9 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestGetWhoPlaysNowWhenInvalidThenException()
|
|
|
|
public void TestGetWhoPlaysNowWhenInvalidThenException()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
void action() => game.GetWhoPlaysNow(); // on an empty collection of players
|
|
|
|
void action() => game.GetWhoPlaysNow(); // on an empty collection of players
|
|
|
@ -203,8 +193,9 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestPrepareNextPlayerWhenEmptyThenException()
|
|
|
|
public void TestPrepareNextPlayerWhenEmptyThenException()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
void action() => game.PrepareNextPlayer(PLAYER_1); // on an empty collection of players
|
|
|
|
void action() => game.PrepareNextPlayer(PLAYER_1); // on an empty collection of players
|
|
|
|
|
|
|
|
|
|
|
@ -216,7 +207,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestPrepareNextPlayerWhenNullThenException()
|
|
|
|
public void TestPrepareNextPlayerWhenNullThenException()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_2);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
@ -230,7 +224,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestPrepareNextPlayerWhenNonExistentThenException()
|
|
|
|
public void TestPrepareNextPlayerWhenNonExistentThenException()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
@ -244,7 +241,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestPrepareNextPlayerWhenValidThenCorrectWithSeveralPlayers()
|
|
|
|
public void TestPrepareNextPlayerWhenValidThenCorrectWithSeveralPlayers()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_2);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
|
|
|
|
|
|
|
@ -264,7 +264,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestPrepareNextPlayerWhenValidThenCorrectWithOnePlayer()
|
|
|
|
public void TestPrepareNextPlayerWhenValidThenCorrectWithOnePlayer()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
@ -283,7 +286,9 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestAddPlayerToGame()
|
|
|
|
public void TestAddPlayerToGame()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_2);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
Player expected = PLAYER_1;
|
|
|
|
Player expected = PLAYER_1;
|
|
|
@ -297,7 +302,9 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestGetPlayersFromGame()
|
|
|
|
public void TestGetPlayersFromGame()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
|
Assert.Empty(game.PlayerManager.GetAll());
|
|
|
|
Assert.Empty(game.PlayerManager.GetAll());
|
|
|
@ -311,7 +318,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestUpdatePlayerInGame()
|
|
|
|
public void TestUpdatePlayerInGame()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_2);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
// Act
|
|
|
@ -326,7 +336,10 @@ namespace Tests.Model_UTs.Games
|
|
|
|
public void TestRemovePlayerFromGame()
|
|
|
|
public void TestRemovePlayerFromGame()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Arrange
|
|
|
|
// Arrange
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE);
|
|
|
|
Game game = new(name: GAME_NAME,
|
|
|
|
|
|
|
|
playerManager: new PlayerManager(),
|
|
|
|
|
|
|
|
dice: DICE_1);
|
|
|
|
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
game.PlayerManager.Remove(PLAYER_1);
|
|
|
|
game.PlayerManager.Remove(PLAYER_1);
|
|
|
@ -338,54 +351,5 @@ namespace Tests.Model_UTs.Games
|
|
|
|
// Assert
|
|
|
|
// Assert
|
|
|
|
Assert.Equal(expected, actual);
|
|
|
|
Assert.Equal(expected, actual);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
|
|
|
public void TestToString()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// Arrange
|
|
|
|
|
|
|
|
DateTime dateTime = DateTime.UtcNow;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Turn> turns = new()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Turn.CreateWithSpecifiedTime(dateTime, PLAYER_1, new()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
{NUM, new NumberDieFace(4)},
|
|
|
|
|
|
|
|
{IMG, new ImageDieFace(40)},
|
|
|
|
|
|
|
|
{CLR, new ColorDieFace("A00FA0")},
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
Turn.CreateWithSpecifiedTime(dateTime, PLAYER_2, new()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
{NUM, new NumberDieFace(3)},
|
|
|
|
|
|
|
|
{IMG, new ImageDieFace(20)},
|
|
|
|
|
|
|
|
{CLR, new ColorDieFace("A00BB8")},
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Game game = new(name: GAME_NAME, playerManager: new PlayerManager(), dice: DICE, turns: turns);
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_1);
|
|
|
|
|
|
|
|
game.PlayerManager.Add(PLAYER_2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
|
|
|
string[] dateTimeString = dateTime.ToString("s", System.Globalization.CultureInfo.InvariantCulture).Split("T");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string date = dateTimeString[0];
|
|
|
|
|
|
|
|
string time = dateTimeString[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string expected =
|
|
|
|
|
|
|
|
"Game: my game" +
|
|
|
|
|
|
|
|
"\nPlayers: Alice Bob" +
|
|
|
|
|
|
|
|
"\nNext: Alice" +
|
|
|
|
|
|
|
|
"\nLog:" +
|
|
|
|
|
|
|
|
"\n\t" + date + " " + time + " -- Alice rolled: 4 Assets/images/40.png #A00FA0" +
|
|
|
|
|
|
|
|
"\n\t" + date + " " + time + " -- Bob rolled: 3 Assets/images/20.png #A00BB8" +
|
|
|
|
|
|
|
|
"\n";
|
|
|
|
|
|
|
|
string actual = game.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Debug.WriteLine("expected:\n" + expected);
|
|
|
|
|
|
|
|
Debug.WriteLine("actual:\n" + actual);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Assert
|
|
|
|
|
|
|
|
Assert.Equal(expected, actual);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|