public void TryInvokeMember_ViaBase_ThrowsRuntimeBinderException() { dynamic dynamic = new DynamicEventDispatcher <NotMatchingSignatures>(new NotMatchingSignatures()); Assert.Throws <RuntimeBinderException>(() => dynamic.When(new DummyEvent { }, 4)); }
public void Fallback_to_base() { dynamic dynamic = new DynamicEventDispatcher <WhenWithMultipleParameters>(new WhenWithMultipleParameters()); Assert.IsEmpty(dynamic.SupportedEventTypes); Assert.Throws <RuntimeBinderException>(() => dynamic.When(new DummyEvent { }, 4)); }
public void Non_public_methods() { dynamic dispatcher = new DynamicEventDispatcher <WhenWithSingleArgument>(new WhenWithSingleArgument()); Assert.Catch <Detected>(() => dispatcher.When(new DummyEvent())); }