public void HandleItem_Passes_Mapped_views_To_Processor_Instance_Process_With_Mapping_By_Type()
 {
     viewProcessorMap.Map(matchingView.GetType()).ToProcess(trackingProcessor);
     viewProcessorMap.HandleView(matchingView, matchingView.GetType());
     viewProcessorMap.HandleView(nonMatchingView, nonMatchingView.GetType());
     AssertThatProcessorHasProcessedThese(trackingProcessor, new object[1] {
         matchingView
     });
 }
Пример #2
0
        public void Create_Mediator_Instantiates_Mediator_For_View_When_Mapped()
        {
            instance.Map(typeof(SupportView)).ToProcess(new MediatorCreator(typeof(SupportMediator)));

            SupportView objA = new SupportView();

            instance.HandleView(objA, objA.GetType());
            objA.AddThisView();

            string[] expectedNotifications = new string[1] {
                "SupportMediator"
            };
            Assert.That(expectedNotifications, Is.EquivalentTo(mediatorWatcher.Notifications));
        }