Beispiel #1
0
        public void View_Is_Handled()
        {
            object          createdMediator = null;
            Action <object> callback        = delegate(object mediator) {
                createdMediator = mediator;
            };

            injector.Map(typeof(Action <object>), "callback").ToValue(callback);
            MediatorMapping mapping = new MediatorMapping(CreateTypeFilter(new Type [1] {
                typeof(SupportView)
            }), typeof(CallbackMediator));

            handler.AddMapping(mapping);
            handler.HandleView(new SupportView(), typeof(SupportView));
            Assert.That(createdMediator, Is.Not.Null);
        }
 public void HandleView(object view, Type type)
 {
     _viewHandler.HandleView(view, type);
 }