Example #1
0
        public static void Save(this TestRun testRun, string path)
        {
            path.Create();
            var fullPath = Path.Combine(path, LocationsProvider.GetTestRunFileName(testRun.TestInfo.Finish));

            using (var file = File.CreateText(fullPath))
            {
                var serializer = new JsonSerializer();
                serializer.Serialize(file, testRun);
            }
        }
Example #2
0
        public static ItemInfo MapTestRunInfo(this ItemInfoDto itemInfoDto)
        {
            var run = new ItemInfo
            {
                Guid     = itemInfoDto.Guid,
                Start    = itemInfoDto.Start,
                Finish   = itemInfoDto.Finish,
                FileName = LocationsProvider.GetTestRunFileName(itemInfoDto.Finish)
            };

            return(run);
        }
Example #3
0
        public static Run Map(this RunDto runDto)
        {
            var run = new Run
            {
                TestRunFiles = runDto.TestsInfo.Select(
                    ti => Path.Combine(ti.Guid.ToString(), LocationsProvider.GetTestRunFileName(ti.Finish))).ToList(),
                Name       = runDto.Name,
                RunInfo    = runDto.RunInfo.MapRunInfo(),
                RunSummary = runDto.RunSummary.Map(),
                Sprint     = runDto.Sprint
            };

            return(run);
        }