public void ActionEvent() { var eventArgs1 = 19; var eventArgs2 = true; "when raising action event passing arguments" .x(() => Fake.ActionEvent += Raise.With <Action <int, bool> >(eventArgs1, eventArgs2)); "it should pass the first argument" .x(() => CapturedArgs1.Should().Be(eventArgs1)); "it should pass the second argument" .x(() => CapturedArgs2.Should().Be(eventArgs2)); }
public void ActionEvent() { "Given an event of type Action" .See(() => nameof(Fake.ActionEvent)); "When I raise the event specifying the arguments" .x(() => Fake.ActionEvent += Raise.With <Action <int, bool> >(19, true)); "Then the first value is passed as the first event argument" .x(() => CapturedArgs1.Should().Be(19)); "Then the second value is passed as the second event argument" .x(() => CapturedArgs2.Should().Be(true)); }