public void when_wire_to_object()
        {
            var dynamicEvent = new RedirectToDynamicEvent();
            var testClass = new TestClassWithMethod();
            dynamicEvent.WireToWhen(testClass);
            var t = new TestRedirectMethod { Id = 333, Name = "Name" };
            dynamicEvent.InvokeEvent(t);

            Assert.AreEqual(t, testClass.RedirectMethod);
        }
        public void when_wire_to_when_method()
        {
            var command = new RedirectToCommand();
            var testClass = new TestClassWithMethod();
            command.WireToWhen(testClass);
            var t = new TestRedirectMethod { Id = 333, Name = "Name" };
            command.Invoke(t);

            Assert.AreEqual(t, testClass.RedirectMethod);
        }
        public void when_wire_to_object()
        {
            var dynamicEvent = new RedirectToDynamicEvent();
            var testClass    = new TestClassWithMethod();

            dynamicEvent.WireToWhen(testClass);
            var t = new TestRedirectMethod {
                Id = 333, Name = "Name"
            };

            dynamicEvent.InvokeEvent(t);

            Assert.AreEqual(t, testClass.RedirectMethod);
        }
Exemple #4
0
        public void when_wire_to_when_method()
        {
            var command   = new RedirectToCommand();
            var testClass = new TestClassWithMethod();

            command.WireToWhen(testClass);
            var t = new TestRedirectMethod {
                Id = 333, Name = "Name"
            };

            command.Invoke(t);

            Assert.AreEqual(t, testClass.RedirectMethod);
        }
Exemple #5
0
 public void When(TestRedirectMethod redirectMethod)
 {
     RedirectMethod = redirectMethod;
 }
 public void When(TestRedirectMethod redirectMethod)
 {
     RedirectMethod = redirectMethod;
 }