Skip to content

Commit fbce6eb

Browse files
authored
Merge pull request #7 from astar-development/features/change-to-CSharpFunctionalExtensions
Features/change to c sharp functional extensions
2 parents 448251c + a858efb commit fbce6eb

File tree

4 files changed

+29
-27
lines changed

4 files changed

+29
-27
lines changed

src/AStar.Dev.Api.HealthChecks/AStar.Dev.Api.HealthChecks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3030
<TargetFramework>net9.0</TargetFramework>
3131
<Title>AStar API HealthChecks</Title>
32-
<Version>0.4.2</Version>
32+
<Version>0.4.3</Version>
3333
</PropertyGroup>
3434

3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

src/AStar.Dev.Api.HealthChecks/AStar.Dev.Api.HealthChecks.xml

Lines changed: 12 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AStar.Dev.Api.HealthChecks/HealthCheckExtensions.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ private static Task WriteHealthCheckResponseAsync(
6262

6363
var dependencyHealthChecks = healthReport.Entries.Select(static entry => new HealthStatusResponse
6464
{
65-
Name = entry.Key,
66-
Description = entry.Value.Description,
67-
Status = entry.Value.Status.ToString(),
68-
DurationInMilliseconds = entry.Value.Duration
69-
.TotalMilliseconds,
70-
Data = entry.Value.Data,
71-
Exception = entry.Value.Exception?.Message
65+
Name = entry.Key,
66+
Description = entry.Value.Description,
67+
Status = entry.Value.Status.ToString(),
68+
DurationInMilliseconds = entry.Value.Duration.TotalMilliseconds,
69+
Data = entry.Value.Data,
70+
Exception = entry.Value.Exception?.Message
7271
});
7372

7473
var healthCheckResponse = new

test/AStar.Dev.Api.HealthChecks.Tests.Unit/HealthStatusResponseShould.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ public class HealthStatusResponseShould
1010
public void ContainTheExpectedProperties()
1111
{
1212
new HealthStatusResponse
13-
{ Name = "Test Name", Description = "Test Description", DurationInMilliseconds = 123, Data = new Dictionary<string, object>(), Exception = "Test Exception", Status = "OK" }
14-
.ToJson().ShouldMatchApproved();
13+
{
14+
Name = "Test Name",
15+
Description = "Test Description",
16+
DurationInMilliseconds = 123,
17+
Data = new Dictionary<string, object>(),
18+
Exception = "Test Exception",
19+
Status = "OK"
20+
}
21+
.ToJson()
22+
.ShouldMatchApproved();
1523
}
1624
}

0 commit comments

Comments
 (0)