コード例 #1
0
        public void NewCharTile_InitialisationWith0Score_ThrowExceptionThatScoreMustBeMoreThan0()
        {
            CharTile c;

            UnitTestGlobals.InvokeActionAndAssertThatCorrectExceptionMessageIsThrown(() => c = new CharTile('A', 0), ExceptionMessages.ScoreMustBeGreaterThan0);
        }
コード例 #2
0
        public void NewCharTile_InitialisationWithLowerCaseChar_ThrowExceptionThatCharMustBeUppercase()
        {
            CharTile c;

            UnitTestGlobals.InvokeActionAndAssertThatCorrectExceptionMessageIsThrown(() => c = new CharTile('a'), ExceptionMessages.LetterCanOnlyBeBetweenAAndZ);
        }
コード例 #3
0
ファイル: Board_Tests.cs プロジェクト: simmeon1/Scrabble_v2
        public void NewBoard_CreationWithBadRowCount_IncorrectRowNumberExceptionIsThrown()
        {
            Board board;

            UnitTestGlobals.InvokeActionAndAssertThatCorrectExceptionMessageIsThrown(() => board = new Board(0, 1), ExceptionMessages.BoardMustHaveAtLeastOneRow);
        }