Exemplo n.º 1
0
 public void TestDrawingWithoutScreen()
 {
     using (GuiManager guiManager = new GuiManager(new GameServiceContainer())) {
         guiManager.Draw(new GameTime());
         // No exception means success
     }
 }
Exemplo n.º 2
0
        public void TestDrawing()
        {
            using (GuiManager guiManager = new GuiManager(new GameServiceContainer())) {
                DummyVisualizer dummy = new DummyVisualizer();

                IGuiVisualizer visualizer = guiManager.Visualizer;
                guiManager.Visualizer = dummy;
                tryDispose(visualizer);

                guiManager.Screen = new Screen();

                Assert.AreEqual(0, dummy.DrawCallCount);
                guiManager.Draw(new GameTime());
                Assert.AreEqual(1, dummy.DrawCallCount);
            }
        }