public void Doesnt_Leave_View_And_Mediator_Mappings_Lying_Around()
        {
            instance.MapMatcher(new TypeMatcher().AnyOf(typeof(ObjectWhichExtendsSupportView), typeof(SupportView))).ToProcess(new MediatorCreator(typeof(SupportMediator)));
            instance.HandleView(new SupportView(), typeof(SupportView));

            Assert.That(injector.HasDirectMapping(typeof(ObjectWhichExtendsSupportView)), Is.False);
            Assert.That(injector.HasDirectMapping(typeof(SupportView)), Is.False);
            Assert.That(injector.HasDirectMapping(typeof(SupportMediator)), Is.False);
        }
Esempio n. 2
0
 public void Process_Passes_Mapped_Views_To_Processor_Instance_Process_With_Mapping_By_Matcher()
 {
     viewProcessorMap.MapMatcher(supportViewMatcher).ToProcess(trackingProcessor);
     viewProcessorMap.Process(matchingView);
     viewProcessorMap.Process(nonMatchingView);
     AssertThatProcessorHasProcessedThese(trackingProcessor, new object[1] {
         matchingView
     });
 }