Наследование: Robotlegs.Mvcs.Context
 public void AutoStartupWithLateViewComponent()
 {
     context = new Robotlegs.Mvcs.Support.TestContext( null, true );
     Assert.IsFalse( context.StartupComplete, "Context should NOT have started" );
     context.ContextView = contextView;
     Assert.IsTrue( context.StartupComplete, "Context should have started" );
 }
        public void RunBeforeEachTest()
        {
            contextView = new TestContextView();
            context = new Robotlegs.Mvcs.Support.TestContext( contextView );
            actor = new TestActor();
            injector = context.GetInjector();
            TestPanel.Children.Add( contextView );

            injector.InjectInto( actor );
        }
        public void AutoStartupWithLateViewComponentAfterAddedToStage()
        {
            contextView = new TestContextView();
            context = new Robotlegs.Mvcs.Support.TestContext( null, true );

            Action<Event> callback = delegate( Event e )
            {
                Assert.IsTrue( context.StartupComplete, "Context should be started" );
                EnqueueTestComplete();
            };
            context.AddEventListener( ContextEvent.STARTUP_COMPLETE, callback );

            Assert.IsFalse( context.StartupComplete, "Context should not be started" );
            context.ContextView = contextView;

            Assert.IsFalse( context.StartupComplete, "Context should still not be started" );
            TestPanel.Children.Add( contextView );
        }
 public void AutoStartupWithViewComponent()
 {
     context = new Robotlegs.Mvcs.Support.TestContext( contextView, true );
     Assert.IsTrue( context.StartupComplete, "Context should have started" );
 }
        public void ManualStartupWithViewComponentAfterAddedToStage()
        {
            contextView = new TestContextView();
            context = new Robotlegs.Mvcs.Support.TestContext( contextView, false );

            contextView.Loaded += (o, e) =>
            {
                Assert.IsFalse( context.StartupComplete, "Context should not be started" );
                context.Startup();
                Assert.IsTrue(  context.StartupComplete, "Context should now be started" );
                EnqueueTestComplete();
            };

            Assert.IsFalse( context.StartupComplete, "Context should not be started" );
            TestPanel.Children.Add( contextView );
        }
 public void ManualStartupWithViewComponent()
 {
     context = new Robotlegs.Mvcs.Support.TestContext( contextView, false );
     Assert.IsFalse( context.StartupComplete, "Context should NOT have started" );
     context.Startup();
     Assert.IsTrue( context.StartupComplete, "Context should now be started" );
 }
 public void ContextInitializationComplete()
 {
     context = new Robotlegs.Mvcs.Support.TestContext( contextView );
     Assert.IsTrue( context.IsInitialized, "Context should be initialized" );
 }