Skip to content

Commit f7adbe4

Browse files
committed
Add new tests to verify coverage diff
1 parent c402a6e commit f7adbe4

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed
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.Common;
6+
7+
public static class Calculator
8+
{
9+
public static int Add(int first, int second)
10+
{
11+
return first + second;
12+
}
13+
14+
public static int Subtract(int first, int second)
15+
{
16+
return first - second;
17+
}
18+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#nullable enable
2+
static Steeltoe.Common.Calculator.Add(int first, int second) -> int
3+
static Steeltoe.Common.Calculator.Subtract(int first, int second) -> int
4+
Steeltoe.Common.Calculator
25
Steeltoe.Common.Discovery.IServiceInstance.InstanceId.get -> string!
36
Steeltoe.Common.Discovery.IServiceInstance.NonSecureUri.get -> System.Uri?
47
Steeltoe.Common.Discovery.IServiceInstance.SecureUri.get -> System.Uri?
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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.Common.Test;
6+
7+
public sealed class CalculatorTest
8+
{
9+
[Fact]
10+
public void CanAdd()
11+
{
12+
int result = Calculator.Add(2, 3);
13+
result.Should().Be(5);
14+
}
15+
16+
[Fact]
17+
public void CanSubtract()
18+
{
19+
int result = Calculator.Subtract(5, 3);
20+
result.Should().Be(2);
21+
}
22+
}

0 commit comments

Comments
 (0)