Skip to content

Commit 4bd5831

Browse files
committed
fix smells
1 parent f453035 commit 4bd5831

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

NetEvent/Server.Tests/SystemModuleTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public async Task PostOrganizationHandler_Error_Test()
9595
}
9696

9797
[Fact]
98-
public async Task GetSystemInfoVersionsSetted_Success_Test()
98+
public async Task GetSystemInfoVersionsSetted_Test()
9999
{
100100
// Arrange
101101
AppDomain currentDomain = AppDomain.CurrentDomain;
@@ -125,10 +125,9 @@ public async Task GetSystemInfoVersionsSetted_Success_Test()
125125
}
126126

127127
[Fact]
128-
public async Task GetSystemInfoVersionsNotSetted_Success_Test()
128+
public async Task GetSystemInfoVersionsNotSetted_Test()
129129
{
130130
// Arrange
131-
AppDomain currentDomain = AppDomain.CurrentDomain;
132131
Environment.SetEnvironmentVariable("BUILDNODE", string.Empty);
133132
Environment.SetEnvironmentVariable("BUILDID", string.Empty);
134133
Environment.SetEnvironmentVariable("BUILDNUMBER", string.Empty);

NetEvent/Server/Modules/System/Endpoints/GetSystemInfo/GetSystemInfoHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public Task<GetSystemInfoResponse> Handle(GetSystemInfoRequest request, Cancella
2828
}
2929

3030
// TODO: is it possible to make that better?
31-
systeminfoversions.Add(new SystemInfoVersionEntryDto("NETEVENT", Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion));
31+
systeminfoversions.Add(new SystemInfoVersionEntryDto("NETEVENT", Assembly.GetEntryAssembly()?.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion));
3232
systeminfoversions.Add(new SystemInfoVersionEntryDto("BUILDNODE", string.IsNullOrEmpty(Environment.GetEnvironmentVariable("BUILDNODE")) ? "dev" : Environment.GetEnvironmentVariable("BUILDNODE")));
3333
systeminfoversions.Add(new SystemInfoVersionEntryDto("BUILDID", string.IsNullOrEmpty(Environment.GetEnvironmentVariable("BUILDID")) ? "dev" : Environment.GetEnvironmentVariable("BUILDNODE")));
3434
systeminfoversions.Add(new SystemInfoVersionEntryDto("BUILDNUMBER", string.IsNullOrEmpty(Environment.GetEnvironmentVariable("BUILDNUMBER")) ? "dev" : Environment.GetEnvironmentVariable("BUILDNODE")));

0 commit comments

Comments
 (0)