Ejemplo n.º 1
0
 public void Unprocess_Passes_Mapped_Views_To_Processor_Instance_Unprocess_With_Mapping_By_Type()
 {
     viewProcessorMap.Map(typeof(SupportView)).ToProcess(trackingProcessor);
     viewProcessorMap.Unprocess(matchingView);
     viewProcessorMap.Unprocess(nonMatchingView);
     AssertThatProcessorHasUnprocessedThese(trackingProcessor, new object[1] {
         matchingView
     });
 }
        public void Runs_Destroy_On_Created_Mediator_When_Unprocess_Runs()
        {
            instance.Map(typeof(SupportView)).ToProcess(new MediatorCreator(typeof(SupportMediator)));

            SupportView view = new SupportView();

            instance.Process(view);
            instance.Unprocess(view);

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

            Assert.That(expectedNotifications, Is.EquivalentTo(mediatorWatcher.Notifications));
        }