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)); }
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 }); }