File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed
Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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
25Steeltoe.Common.Discovery.IServiceInstance.InstanceId.get -> string!
36Steeltoe.Common.Discovery.IServiceInstance.NonSecureUri.get -> System.Uri?
47Steeltoe.Common.Discovery.IServiceInstance.SecureUri.get -> System.Uri?
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments