Ejemplo n.º 1
0
        public SimpleItemInfoDto SaveScreenshot(TestScreenshotDto testScreenshot)
        {
            var screenshotEntity = testScreenshot.Map();

            Database.SaveScreenshot(screenshotEntity);
            return(screenshotEntity.Data.TestScreenshotInfo.ToDto());
        }
        public SimpleItemInfoDto SaveScreenshot(TestScreenshotDto screenshotDto)
        {
            var testScreenshot = screenshotDto.Map();
            var path           = _locationsProvider.GetScreenshotFolderPath(testScreenshot.TestGuid);

            testScreenshot.Save(path);
            _logger.Info($"Screenshot was saved: '{path}'");
            _logger.Debug($"Screenshot data was saved correctly: {JsonConvert.SerializeObject(testScreenshot, Formatting.Indented)}");
            return(testScreenshot.TestScreenshotInfo.ToDto());
        }