Skip to content

Commit

Permalink
Update Sender.Concepts.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Feb 2, 2024
1 parent 0eb5350 commit 7310835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ReportPortal.GaugePlugin/Results/Sender.Concepts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void StartConcept(ConceptExecutionStartingRequest request)
{
var scenarioKey = GetScenarioKey(request.CurrentExecutionInfo, request.CurrentExecutionInfo.CurrentSpec, request.CurrentExecutionInfo.CurrentScenario);

var parentReporter = _scenarioConcepts.ContainsKey(scenarioKey) ? _scenarioConcepts[scenarioKey].Last() : _scenarios[scenarioKey];
var parentReporter = _scenarioConcepts.TryGetValue(scenarioKey, out var concepts) ? concepts.Last() : _scenarios[scenarioKey];

var conceptReporter = parentReporter.StartChildTestReporter(new StartTestItemRequest
{
Expand All @@ -29,7 +29,7 @@ public void StartConcept(ConceptExecutionStartingRequest request)
HasStats = false
});

if (_scenarioConcepts.TryGetValue(scenarioKey, out List<ITestReporter> concepts))
if (concepts is not null)
{
concepts.Add(conceptReporter);
}
Expand Down

0 comments on commit 7310835

Please sign in to comment.