public void Execute() { var expectedCount = _actualCount; _sut.Execute(1); Assert.AreNotEqual(expectedCount, _actualCount); Assert.IsTrue(expectedCount < _actualCount); }
public void CannotExecute() { int expectedCount = _actualCount; var sut = new CommandDisableAble <int>( o => false, _actionToExecute); bool actualResult = sut.CanExecute(_parameters); Assert.AreEqual(expected: false, actualResult); sut.Execute(_parameters); Assert.AreEqual(expectedCount, _actualCount); sut.Execute(_parameters as object); Assert.AreEqual(expectedCount, _actualCount); }
public void CanExecute_ThrowsInvalidCastException() { Assert.ThrowsException <InvalidCastException>( () => _sut.Execute("")); }