public void InvokeTwoMatches_Name() { var target = new InvokeSubject(); ((Action)(() => target.InvokeEventHandler("Control", new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)))) .Should().Throw <ArgumentException>(); }
public void InvokeNoMethod_Args() { var target = new InvokeSubject(); ((Action)(() => target.InvokeEventHandler("Click", EventArgs.Empty))) .Should().Throw <ArgumentException>(); }
public void InvokeChange() { var target = new InvokeSubject(); target.InvokeEventHandler("Change", EventArgs.Empty); target.ClickInvoked.Should().BeFalse(); target.ChangedInvoked.Should().BeTrue(); }
public void InvokeClick() { var target = new InvokeSubject(); target.InvokeEventHandler("Click", new MouseEventArgs(MouseButtons.None, 0, 0, 0, 0)); target.ClickInvoked.Should().BeTrue(); target.ChangedInvoked.Should().BeFalse(); }