public void TestIfMementoProvidesDeepCopy()
{
var game = new GameModel();
this.logic.RandomizeBalloonField(game.Field);
this.memento.SaveState(game);
var stateFromMemento = this.memento.GetState();
game.Field[0, 0].IsPopped = true;
Assert.IsFalse(ReferenceEquals(game.Field, stateFromMemento.Field));
bool areEqual = true;
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 10; j++)
{
if (game.Field[i, j].IsPopped != stateFromMemento.Field[i, j].IsPopped)
{
areEqual = false;
}
}
}
Assert.IsFalse(areEqual);
}