Skip to content

Commit d776068

Browse files
committed
Verify Coverlet fix for coverlet-coverage/coverlet#1762
1 parent d95d9bf commit d776068

5 files changed

Lines changed: 36 additions & 8 deletions

File tree

nuget.config

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
<packageSources>
44
<clear />
55
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
6+
<add key="coverletNightly" value="https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json" />
67
</packageSources>
7-
<packageSourceMapping>
8-
<packageSource key="nuget.org">
9-
<package pattern="*" />
10-
</packageSource>
11-
</packageSourceMapping>
128
</configuration>

src/Management/src/Endpoint/Actuators/Health/Contributors/FileSystem/NetworkShareWrapper.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information.
44

5-
using System.Diagnostics.CodeAnalysis;
65
using System.Runtime.InteropServices;
76

87
namespace Steeltoe.Management.Endpoint.Actuators.Health.Contributors.FileSystem;
@@ -27,7 +26,6 @@ private NetworkShareWrapper(ulong freeBytesAvailable, ulong totalNumberOfBytes)
2726
: null;
2827
}
2928

30-
[ExcludeFromCodeCoverage(Justification = "Workaround for https://github.com/coverlet-coverage/coverlet/issues/1762")]
3129
private static partial class NativeMethods
3230
{
3331
[LibraryImport("kernel32.dll", EntryPoint = "GetDiskFreeSpaceExW", StringMarshalling = StringMarshalling.Utf16, SetLastError = true)]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
namespace Steeltoe.Management.Endpoint;
6+
7+
internal sealed class Calculator
8+
{
9+
public int Add(int first, int second)
10+
{
11+
return first + second;
12+
}
13+
14+
public int Subtract(int first, int second)
15+
{
16+
return first - second;
17+
}
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
namespace Steeltoe.Management.Endpoint.Test;
6+
7+
public sealed class CalculatorTest
8+
{
9+
[Fact]
10+
public void Can_add()
11+
{
12+
var calculator = new Calculator();
13+
int result = calculator.Add(3, 5);
14+
result.Should().Be(8);
15+
}
16+
}

versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77

88
<AspNetCoreHealthChecksVersion>9.0.*</AspNetCoreHealthChecksVersion>
9-
<CoverletVersion>8.0.*</CoverletVersion>
9+
<CoverletVersion>8.1.0-preview-0018-g64b99d2d05</CoverletVersion>
1010
<FluentAssertionsVersion>7.2.*</FluentAssertionsVersion>
1111
<MicrosoftAzureCosmosVersion>3.58.*</MicrosoftAzureCosmosVersion>
1212
<MicrosoftCodeAnalysisVersion>5.0.*</MicrosoftCodeAnalysisVersion>

0 commit comments

Comments
 (0)