Esempio n. 1
0
 public TestCaseFullDto()
 {
     Id                  = "";
     ParentId            = "";
     GhprTestRun         = new TestRunDto();
     GhprTestOutput      = new TestOutputDto();
     GhprTestScreenshots = new List <TestScreenshotDto>();
 }
Esempio n. 2
0
        public void DeleteTestOutput(TestRunDto testRun, TestOutputDto testOutput)
        {
            _dataWriterLogger.Debug($"Deleting test run output with guid = {testRun.TestInfo.Guid}");
            var outputs = AllTestOutputDtos ?? new List <TestOutputDto>();

            outputs.RemoveAll(o => o.TestOutputInfo.Date.Equals(testOutput.TestOutputInfo.Date) &&
                              o.TestOutputInfo.ItemName.Equals(testOutput.TestOutputInfo.ItemName));
            outputs.Add(testOutput);
            _cache.Set(AllTestOutputDtosKey, outputs, Offset);
        }
Esempio n. 3
0
        public void UpdateTestOutput(ItemInfoDto testInfo, TestOutputDto testOutput)
        {
            _dataWriterLogger.Debug("Updating test output in Common cache");
            var test = GetTestRun(testInfo);

            if (test != null)
            {
                SaveTestRun(test, testOutput);
            }
        }
Esempio n. 4
0
        public ItemInfoDto SaveTestRun(TestRunDto testRun, TestOutputDto testOutput)
        {
            _dataWriterLogger.Debug("Saving test run and output in Common cache");
            _cache.Set(testRun.TestInfo.Guid.ToString(), testRun, Offset);

            var tests = AllTestRunDtos ?? new List <TestRunDto>();

            tests.RemoveAll(tr => tr.TestInfo.Guid.Equals(testRun.TestInfo.Guid) && tr.TestInfo.Finish.Equals(testRun.TestInfo.Finish));
            tests.Add(testRun);
            _cache.Set(AllTestRunDtosKey, tests, Offset);

            var outputs = AllTestOutputDtos ?? new List <TestOutputDto>();

            outputs.RemoveAll(o => o.TestOutputInfo.Date.Equals(testOutput.TestOutputInfo.Date) &&
                              o.TestOutputInfo.ItemName.Equals(testOutput.TestOutputInfo.ItemName));
            outputs.Add(testOutput);
            _cache.Set(AllTestOutputDtosKey, outputs, Offset);
            _dataWriterLogger.Debug("Saving test run and output in Common cache: Done");
            return(testRun.TestInfo);
        }