Exemple #1
0
 public void CreateScreenshots(IEnumerable <IScreenshotDefinition> screenshotDefinitions)
 {
     foreach (var screenshotDefinition in screenshotDefinitions)
     {
         var filePath = _filePathProvider.GetFilePath(screenshotDefinition.FileName);
         _screenshotProvider.SaveScreenshot(screenshotDefinition.Url, filePath);
     }
 }
Exemple #2
0
        public IScreenshotTestResult Run(IScreenshotDefinition outline)
        {
            var newFilePath = _newFilePathProvider.GetFilePath(outline.FileName);
            var oldFilePath = _oldFilePathProvider.GetFilePath(outline.FileName);

            _screenshotProvider.SaveScreenshot(outline.Url, newFilePath);
            var result = _bitmapComparer.AreSame(oldFilePath, newFilePath);

            return(new ScreenshotTestResult(result));
        }