Skip to content

Commit c220e67

Browse files
priyasomangalipsomangali
andauthored
using ternary expression (#40)
Co-authored-by: psomangali <[email protected]>
1 parent 912de6d commit c220e67

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Agoda.Tests.Metrics/TestCasePayload.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,8 @@ public TestCasePayload(string metricsVersion, GitContext gitContext, IList<TestC
2626
Branch = gitContext.BranchName;
2727
NUnitTestCases = testCases.ToList();
2828
IsDebuggerAttached = System.Diagnostics.Debugger.IsAttached;
29-
var ciJobId = Environment.GetEnvironmentVariable("CI_JOB_ID");
30-
if (!string.IsNullOrEmpty(ciJobId))
31-
{
32-
RunId = ciJobId;
33-
}
34-
else
35-
{
36-
RunId = Guid.NewGuid().ToString();
37-
}
29+
var ciJobId = Environment.GetEnvironmentVariable("CI_JOB_ID");
30+
RunId = string.IsNullOrEmpty(ciJobId) ? Guid.NewGuid().ToString() : ciJobId;
3831
}
3932

4033
public bool IsDebuggerAttached { get; set; }

0 commit comments

Comments
 (0)