public void CheckSquareCommand_Execute_Toggles_BingoSquare_IsCheckedProperty()
        {
            BingoSquare square       = new BingoSquare("Test", 0);
            bool?       checkedState = square.IsChecked;

            target.CheckSquareCommand.Execute(square);

            Assert.AreEqual <bool?>(!checkedState, square.IsChecked);
        }
Beispiel #2
0
 public BingoBoard(string[] input)
 {
     for (var i = 0; i < input.Length; i++)
     {
         var nums = input[i].Split(" ").Where(x => x != "").Select(y => Convert.ToInt32(y)).ToArray();
         for (var j = 0; j < nums.Length; j++)
         {
             Squares[i, j] = new BingoSquare {
                 Value = nums[j]
             };
         }
     }
 }
Beispiel #3
0
        protected override void InitializeCommands()
        {
            this.CheckSquareCommand = new PresenterCommand()
            {
                CanExecuteDelegate = ((o) => { return(true); }),
                ExecuteDelegate    = ((o) => {
                    BingoSquare square = o as BingoSquare;
                    if (square == null)
                    {
                        return;
                    }

                    square.IsChecked = !square.IsChecked;
                })
            };
        }
Beispiel #4
0
 public void MyTestCleanup()
 {
     target = null;
 }
Beispiel #5
0
 public void MyTestInitialize()
 {
     target = new BingoSquare(buzzword, squarePosition);
 }