Namespace: DeltaEngine.Graphics
Assembly: DeltaEngine.Graphics (in DeltaEngine.Graphics.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Graphics.Tests.ScreenshotCapturerTests
1 unit tests call DeltaEngine.Graphics.ScreenshotCapturer.MakeScreenshot(System.String)
Assembly: DeltaEngine.Graphics (in DeltaEngine.Graphics.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- fileName
- Type: System String
Remarks
Examples
[Test, CloseAfterFirstFrame] public void MakeScreenshotOfYellowBackground() { Resolve<Window>().BackgroundColor = Color.Yellow; new DrawingTests.Line(Vector2D.Zero, new Vector2D(1280, 720), Color.Red); RunAfterFirstFrame(() => { var capturer = Resolve<ScreenshotCapturer>(); capturer.MakeScreenshot(ScreenshotFileName); if (!StackTraceExtensions.StartedFromNCrunchOrNunitConsole) Process.Start(ScreenshotFileName); //ncrunch: no coverage else if (capturer is MockScreenshotCapturer) Assert.AreEqual(ScreenshotFileName, (capturer as MockScreenshotCapturer).LastFilename); }); }
See Also