public void InvokeActionTest() { StubEventInitiator eventInititator = new StubEventInitiator(); MockStubEventInitiatorSink eventSink = new MockStubEventInitiatorSink(eventInititator); eventSink.SetExpectedDummyEventCalls(1); eventInititator.Run(); eventSink.Verify(); }
public MockStubEventInitiatorSink(StubEventInitiator stubEventInitiator) { Assert.IsNotNull(stubEventInitiator); stubEventInitiator.DummyEvent += delegate { _DummyEventCallsCount.Inc(); }; }
public MockStubEventInitiatorSink(StubEventInitiator stubEventInitiator) { if (stubEventInitiator == null) { Assert.Fail("stubEventInitiator cannot be null."); } stubEventInitiator.DummyEvent += delegate { _DummyEventCallsCount.Inc(); }; }