Esempio n. 1
0
        public void SetTupleOfIndexes_EnterCordinatesOfFieldInTheCorrectFormatAsInput_SetsTupleOfIndexes
            (string CordinatesOfField, int first, int second)
        {
            var Manager = new Minesweeper.ManagerOfFieldIndexes();
            var Input   = new StringReader(CordinatesOfField);

            Console.SetIn(Input);
            Manager.UserInputOfFieldIndexesInTextVersion();

            Manager.SetTupleOfIndexes();

            Assert.AreEqual(Tuple.Create(first, second), Manager.TupleOfIndexes);
        }
Esempio n. 2
0
        public void CheckIndexesInTextVersion_EnterCordinatesOfFieldInWrongFormatAsInput_ReturnsFalse
            (string CordinatesOfField)
        {
            var Manager = new Minesweeper.ManagerOfFieldIndexes();
            var Input   = new StringReader(CordinatesOfField);

            Console.SetIn(Input);
            Manager.UserInputOfFieldIndexesInTextVersion();

            var Result = Manager.CheckIndexesInTextVersion();

            Assert.IsFalse(Result);
        }