public void Process_Instantiates_Mediator_For_View_When_Matched_To_Mapping()
        {
            instance.Map(typeof(SupportView)).ToProcess(new MediatorCreator(typeof(SupportMediator)));

            instance.Process(new SupportView());

            List <string> expectedNotifications = new List <string> {
                "SupportMediator"
            };

            Assert.That(expectedNotifications, Is.EquivalentTo(mediatorWatcher.Notifications));
        }
Example #2
0
        public void Process_Passes_Mapped_Views_To_Processor_Instance_Process_With_Mapping_By_Type()
        {
            viewProcessorMap.Map(typeof(SupportView)).ToProcess(trackingProcessor);
            viewProcessorMap.Process(matchingView);
            viewProcessorMap.Process(nonMatchingView);

            AssertThatProcessorHasProcessedThese(trackingProcessor, new object[1] {
                matchingView
            });
        }