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); }
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] }; } } }
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; }) }; }
public void MyTestCleanup() { target = null; }
public void MyTestInitialize() { target = new BingoSquare(buzzword, squarePosition); }