Exemplo n.º 1
0
        public void TestClearField()
        {
            //arrange
            IndexModel page = new IndexModel();

            //act
            page.OnPostClear();

            //assert
            Assert.Equal(SudokuTheories.GetTheory(SudokuTheories.THEORY_TYPE.NULL_FIELD), page.Field);
            Assert.True(page.FieldIsValid);
        }
Exemplo n.º 2
0
        public void TestDigitOutsideRange()
        {
            //arrange
            IndexModel page = new IndexModel
            {
                Field = SudokuTheories.GetTheory(SudokuTheories.THEORY_TYPE.INPUT_OUTSIDE_RANGE)
            };

            //act
            page.OnPostSolve();

            //assert
            Assert.False(page.FieldIsValid);
            Assert.Equal("You can only use digits 1-9", Error.GetMessage());
        }