public void GetMementoShouldReturnDifferentInstanceOfMatrix()
        {
            var memory = new FieldMemory(filledMatrix);
            var savedMatrix = memory.GetMemento();

            Assert.AreNotSame(filledMatrix, savedMatrix);
        }
        public void GetMementoShouldReturnNonEmptyMatrixWhenSuchPassed()
        {
            var memory = new FieldMemory(filledMatrix);
            var savedMatrix = memory.GetMemento();

            var expectedResult = true;
            for (int i = 0; i < savedMatrix.GetLength(0); i++)
            {
                for (int j = 0; j < savedMatrix.GetLength(1); j++)
                {
                    if (savedMatrix[i, i] == null)
                    {
                        expectedResult = false;
                    }
                }
            }

            Assert.IsTrue(expectedResult);
        }
 public void RestoreField(FieldMemory memento)
 {
     this.fieldMatrix = memento.GetMemento();
 }