public void CreateOutlinedRectFromPointAndSize(Type resolver) { OutlinedRect outlinedRect = null; Start(resolver, (Renderer r) => r.Add(outlinedRect = new OutlinedRect(Point.Half, Size.Half, Color.Red)), () => Assert.AreEqual(Color.Red, outlinedRect.Color)); }
public void CreateOutlinedRectFromRectangle(Type resolver) { var halfScreenRect = new Rectangle(Point.Zero, Size.Half); OutlinedRect outlinedRect = null; Start(resolver, (Renderer r) => r.Add(outlinedRect = new OutlinedRect(halfScreenRect, Color.Red)), () => Assert.AreEqual(Color.Red, outlinedRect.Color)); }
public void AddingOutlinedRectTwiceWillOnlyDisplayItOnce(Type resolver) { OutlinedRect outlinedRect = null; Start(resolver, (Renderer r) => { outlinedRect = new OutlinedRect(Point.Half, Size.Half, Color.Yellow); r.Add(outlinedRect); outlinedRect.DrawArea.Center = new Point(0.6f, 0.6f); outlinedRect.Color = Color.Teal; r.Add(outlinedRect); }, () => Assert.AreEqual(Color.Teal, outlinedRect.Color)); }