示例#1
0
文件: CanvasTests.cs 项目: ke2083/KOS
 public void TestCanvasDrawsPointCorrectly()
 {
     screen = MockRepository.GenerateStub<Screen>();
     var canvas = new Canvas(screen);
     var layerId = canvas.CreateLayer();
     var layer = canvas.GetLayer(layerId);
     layer.DrawPoint(20, 20, Colour.LightBlue);
     screen.Expect(s => s.DrawPoint(20, 20, Colour.LightBlue)).Repeat.Once();
     canvas.Redraw();
     screen.VerifyAllExpectations();
 }