Пример #1
0
        public void CreateMineField_CreatesMineField_ForGivenText()
        {
            // Arrange
            var mineField = Substitute.For <IMineField>();

            mineField.RowsCount.Returns(1);
            mineField.ColumnsCount.Returns(2);
            m_Converter.ToMineField(Arg.Any <string>()).Returns(mineField);
            MineFieldManager sut = CreateSut();

            // Act
            sut.CreateMineField("Doesn't matter!");

            // Assert
            Assert.AreEqual(1,
                            mineField.RowsCount,
                            "RowsCount");
            Assert.AreEqual(2,
                            mineField.ColumnsCount,
                            "ColumnsCount");
        }
Пример #2
0
        public void CreateMineField(string text)
        {
            m_MineField = m_Converter.ToMineField(text);

            CreateCommon();
        }