public void FireCustomEvent_PublicationMustContainCustemEventArgumentsType()
        {
            CustomEventArguments e = new CustomEventArguments("test");

            this.testee.Fire(EventTopics.CustomEventArgs, this, HandlerRestriction.None, this, e);

            this.interceptedPublication.Should().NotBeNull();
            Assert.Equal(typeof(CustomEventArguments), this.interceptedPublication.EventArgsType);
        }
        public void FireCustomEvent()
        {
            Subscriber s = this.RegisterSubscriber();

            CustomEventArguments e = new CustomEventArguments("test");
            this.testee.Fire(EventTopics.CustomEventArgs, this, HandlerRestriction.None, this, e);

            s.ReceivedCustomEventArguments.Should().BeSameAs(e);
        }
        public void FireCustomEvent()
        {
            Subscriber s = this.RegisterSubscriber();

            CustomEventArguments e = new CustomEventArguments("test");

            this.testee.Fire(EventTopics.CustomEventArgs, this, HandlerRestriction.None, this, e);

            s.ReceivedCustomEventArguments.Should().BeSameAs(e);
        }
        public void FireCustomEvent_PublicationMustContainCustemEventArgumentsType()
        {
            CustomEventArguments e = new CustomEventArguments("test");
            this.testee.Fire(EventTopics.CustomEventArgs, this, HandlerRestriction.None, this, e);

            this.interceptedPublication.Should().NotBeNull();
            Assert.Equal(typeof(CustomEventArguments), this.interceptedPublication.EventArgsType);
        }
예제 #5
0
 /// <summary>
 /// Handles the custom event.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public void HandleCustomEvent(object sender, CustomEventArguments e)
 {
     this.valueFromCustomEventArgs = e.String;
 }
 public void SimpleEvent(object sender, CustomEventArguments e)
 {
 }
예제 #7
0
 /// <summary>
 /// Handles the custom event.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public void HandleCustomEvent(object sender, CustomEventArguments e)
 {
     this.valueFromCustomEventArgs = e.String;
 }
예제 #8
0
 /// <summary>
 /// Handles the custom event.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The event arguments.</param>
 public void HandleCustomEvent(object sender, CustomEventArguments e)
 {
     this.Called = true;
 }
예제 #9
0
 public void CustomEventArgs(object sender, CustomEventArguments e)
 {
     this.ReceivedCustomEventArguments = e;
 }
예제 #10
0
 public void SimpleEvent(object sender, CustomEventArguments e)
 {
 }
예제 #11
0
 public void CustomEventArgs(object sender, CustomEventArguments e)
 {
     this.ReceivedCustomEventArguments = e;
 }
 /// <summary>
 /// Handles the custom event.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The event arguments.</param>
 public void HandleCustomEvent(object sender, CustomEventArguments e)
 {
     this.Called = true;
 }