public void Setup()
		{
			injector = new robotlegs.bender.framework.impl.RobotlegsInjector();
			viewProcessorFactory = new ViewProcessorFactory(injector);
			trackingProcessor = new TrackingProcessor();
			view = new object();
		}
		public void Setup()
		{
			injector = new RobotlegsInjector();
			injector.Map(typeof(RobotlegsInjector)).ToValue(injector);
			viewProcessorMap = new ViewProcessorMap(new ViewProcessorFactory(injector));
			trackingProcessor = new TrackingProcessor();
			trackingProcessor2 = new TrackingProcessor();
			matchingView = new SupportView();
			nonMatchingView = new ObjectB();
			guardObject = new GuardObject();
			matchingView2 = new SupportViewWithWidthAndHeight();
		}
		public void RunProcessOnMultipleProcessors()
		{
			List<ViewProcessorMapping> mappings = new List<ViewProcessorMapping>();
			mappings.Add(new ViewProcessorMapping(new TypeMatcher().AllOf(view.GetType()).CreateTypeFilter(), trackingProcessor));

			TrackingProcessor trackingProcessor2 = new TrackingProcessor();
			mappings.Add(new ViewProcessorMapping(new TypeMatcher().AllOf(view.GetType()).CreateTypeFilter(), trackingProcessor2));

			viewProcessorFactory.RunProcessors(view, view.GetType(), mappings.ToArray());
			Assert.That (trackingProcessor.ProcessedViews, Is.EquivalentTo (new object[1]{view}));
			Assert.That (trackingProcessor2.ProcessedViews, Is.EquivalentTo (new object[1]{view}));
		}
		protected void AssertThatProcessorHasUnprocessedThese(TrackingProcessor processor, object[] expected)
		{
			Assert.That(processor.UnprocessedViews, Is.EqualTo(expected).AsCollection);
		}
		public void RunAllUnprocessors_Runs_All_Unprocessors_For_All_Views()
		{
			TrackingProcessor trackingProcessor2 = new TrackingProcessor();

			SupportView view = new SupportView();
			ObjectWhichExtendsSupportView viewA = new ObjectWhichExtendsSupportView();

			ViewProcessorMapping mapping = new ViewProcessorMapping(new TypeMatcher().AllOf(view.GetType()).CreateTypeFilter(), trackingProcessor);
			ViewProcessorMapping mappingA = new ViewProcessorMapping(new TypeMatcher().AllOf(viewA.GetType()).CreateTypeFilter(), trackingProcessor2);

			viewProcessorFactory.RunProcessors(view, view.GetType(), new ViewProcessorMapping[1] {mapping});
			viewProcessorFactory.RunProcessors(viewA, viewA.GetType(), new ViewProcessorMapping[2] {mapping, mappingA});

			viewProcessorFactory.RunAllUnprocessors();

			Assert.That (trackingProcessor.UnprocessedViews, Is.EquivalentTo (new object[2]{ view, viewA }), "trackingProcessor unprocessed all views");
			Assert.That (trackingProcessor2.UnprocessedViews, Is.EquivalentTo (new object[1]{ viewA }), "trackingProcessor2 unprocessed all views");
		}