Ejemplo n.º 1
0
        public void AddDataAt_Test()
        {
            var positions  = _board.Positions;
            var testSample = new MockBoardElement[positions.Length];

            for (var i = 0; i < testSample.Length; i++)
            {
                testSample[i] = GetTestData();
            }

            for (var i = 0; i < positions.Length; i++)
            {
                var position = positions[i];
                _board.AddDataAt(testSample[i], position.Cell);
            }

            for (var i = 0; i < positions.Length; i++)
            {
                var data1 = testSample[i];
                var data2 = _board.GetDataFrom(positions[i].Cell);
                Assert.IsTrue(data1 == data2);
            }
        }