public void CreateAndDispose()
        {
            ColoredRectangle box = null;

            TestAppOnce.Start((Renderer r) => box = new ColoredRectangle(r, HalfScreenRect, Color.Red));
            Assert.AreEqual(Color.Red, box.Color);
            box.Dispose();
        }
Example #2
0
 public void StartRunFewTimesAndCloseGame()
 {
     TestAppOnce.Start((LogoGame game) =>
     {
         for (int i = 0; i < 50; i++)
         {
             game.Run();
         }
     });
 }
Example #3
0
        public void AddDrawSetColorRemove()
        {
            ColoredRectangle box = null;

            TestAppOnce.Start((Renderer r) =>
            {
                box = new ColoredRectangle(r, HalfScreenRect, Color.Red);
                r.Add(box);
                r.DrawRectangle(box.Rect, Color.Green);
                r.Remove(box);
            });
            box.Dispose();
        }
Example #4
0
 public void StartGameWithMocks()
 {
     TestAppOnce.Start((LogoGame game) => game.Run());
 }