Skip to content

Commit e0aeb81

Browse files
Merge branch 'nsubstitute:main' into 766-Argument-Matcher-For-A-Struct
2 parents 2885899 + 54fbbad commit e0aeb81

12 files changed

Lines changed: 56 additions & 75 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,9 @@ updates:
99
- package-ecosystem: "github-actions"
1010
directory: "/"
1111
schedule:
12-
interval: "monthly"
13-
open-pull-requests-limit: 3
14-
- package-ecosystem: "nuget"
15-
directory: "/src/NSubstitute"
16-
schedule:
17-
interval: "monthly"
18-
open-pull-requests-limit: 3
19-
groups:
20-
nsubstitute_minor_patch_updates:
21-
update-types:
22-
- "minor"
23-
- "patch"
24-
ignore:
25-
- dependency-name: "*"
26-
update-types: ["version-update:semver-major"]
27-
- package-ecosystem: "nuget"
28-
directory: "/tests/NSubstitute.Acceptance.Specs"
29-
schedule:
30-
interval: "monthly"
31-
open-pull-requests-limit: 3
32-
groups:
33-
nsubstitute_acceptance_specs_minor_patch_updates:
34-
update-types:
35-
- "minor"
36-
- "patch"
37-
ignore:
38-
- dependency-name: "*"
39-
update-types: ["version-update:semver-major"]
12+
interval: "weekly"
13+
4014
- package-ecosystem: "nuget"
41-
directory: "/tests/NSubstitute.Benchmarks"
15+
directory: "/"
4216
schedule:
43-
interval: "monthly"
44-
open-pull-requests-limit: 3
45-
groups:
46-
nsubstitute_benchmarks_minor_patch_updates:
47-
update-types:
48-
- "minor"
49-
- "patch"
50-
ignore:
51-
- dependency-name: "*"
52-
update-types: ["version-update:semver-major"]
17+
interval: "weekly"

.github/workflows/release_documentation.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ jobs:
77
runs-on: windows-latest
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v4
10+
uses: actions/checkout@v6
1111

1212
- name: Setup .NET
13-
uses: actions/setup-dotnet@v4
13+
uses: actions/setup-dotnet@v5
1414
with:
1515
dotnet-version: |
16+
10.0.x
1617
9.0.x
1718
8.0.x
1819
@@ -24,7 +25,7 @@ jobs:
2425
working-directory: ./docs
2526

2627
- name: Upload documentation
27-
uses: actions/upload-artifact@v4
28+
uses: actions/upload-artifact@v5
2829
with:
2930
name: docs
3031
path: |

.github/workflows/release_packages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ jobs:
77
runs-on: windows-latest
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v4
10+
uses: actions/checkout@v6
1111

1212
- name: Setup .NET
13-
uses: actions/setup-dotnet@v4
13+
uses: actions/setup-dotnet@v5
1414
with:
15-
dotnet-version: 9.0.x
15+
dotnet-version: 10.0.x
1616

1717
- name: Build package
1818
run: dotnet pack src/NSubstitute/NSubstitute.csproj -o bin -p:CI=true
1919

2020
- name: Upload packages
21-
uses: actions/upload-artifact@v4
21+
uses: actions/upload-artifact@v5
2222
with:
2323
name: packages
2424
path: |

.github/workflows/test.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,46 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [windows-latest, ubuntu-latest, macOS-latest]
13-
framework: [net9.0, net8.0]
14-
include:
15-
- os: windows-latest
16-
framework: net462
1713

1814
runs-on: ${{ matrix.os }}
1915
steps:
2016
- name: Checkout
21-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
2218

2319
- name: Setup .NET
24-
uses: actions/setup-dotnet@v4
20+
uses: actions/setup-dotnet@v5
2521
with:
2622
dotnet-version: |
23+
10.0.x
2724
9.0.x
2825
8.0.x
2926
3027
- name: Build
3128
run: dotnet build
3229

33-
- name: Test
34-
run: dotnet test -f ${{ matrix.framework }} --no-build --no-restore
30+
- name: .NET Framework Tests
31+
if: matrix.os == 'windows-latest'
32+
run: dotnet test -f net462 --no-build --no-restore --no-progress
33+
34+
- name: .NET 8 Tests
35+
run: dotnet test -f net8.0 --no-build --no-restore --no-progress
36+
37+
- name: .NET 9 Tests
38+
run: dotnet test -f net9.0 --no-build --no-restore --no-progress
39+
40+
- name: .NET 10 Tests
41+
run: dotnet test -f net10.0 --no-build --no-restore --no-progress
3542

3643
format-verify:
3744
runs-on: ubuntu-latest
3845
steps:
3946
- name: Checkout
40-
uses: actions/checkout@v4
47+
uses: actions/checkout@v6
4148

4249
- name: Setup .NET
43-
uses: actions/setup-dotnet@v4
50+
uses: actions/setup-dotnet@v5
4451
with:
45-
dotnet-version: 9.0.x
52+
dotnet-version: 10.0.x
4653

4754
- name: Format
4855
run: dotnet format --verify-no-changes

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* [NEW] Added NuGet Package README file.
1414
* [UPDATE] Make public api and tests the same for all TFMs
1515
* [UPDATE] Migrate documentation samples to NUnit4
16+
* [NEW] Added .NET 10 to test matrix
1617

1718
### 5.3.0 (October 2024)
1819

docs/help/received-calls/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void Should_execute_command() {
3131
}
3232
```
3333

34-
In this case `command` did receive a call to `Execute()`, and so will complete successfully. If `Execute()` has not been received NSubstitute will throw a `ReceivedCallsException` and let you know what call was expected and with which arguments, as well as listing actual calls to that method and which the arguments differed.
34+
In this case `command` did receive a call to `Execute()`, and so will complete successfully. If `Execute()` has not been received NSubstitute will throw a `ReceivedCallsException` and let you know what call was expected and with which arguments, as well as listing actual calls to that method and which of the arguments differed.
3535

3636
## Check a call was not received
3737
NSubstitute can also make sure a call was not received using the `DidNotReceive()` extension method.

docs/help/set-return-value/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ Assert.That("HEX", Is.EqualTo(calculator.Mode));
5151

5252

5353
## More ways of setting return values
54-
This covers the very basics of setting a return value, but NSubstitute can do much more. Read on for other approachs, including [matching specific arguments](/help/return-for-args), [ignoring arguments](/help/return-for-any-args), using [functions to calculate return values](/help/return-from-function) and returning [multiple results](/help/multiple-returns).
54+
This covers the very basics of setting a return value, but NSubstitute can do much more. Read on for other approaches, including [matching specific arguments](/help/return-for-args), [ignoring arguments](/help/return-for-any-args), using [functions to calculate return values](/help/return-from-function) and returning [multiple results](/help/multiple-returns).

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"test": {
3+
"runner": "Microsoft.Testing.Platform"
4+
}
5+
}

tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net9.0;net8.0;net462</TargetFrameworks>
4+
<TargetFrameworks>net10.0;net9.0;net8.0;net462</TargetFrameworks>
5+
<OutputType>Exe</OutputType>
6+
<EnableNUnitRunner>true</EnableNUnitRunner>
7+
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
58
</PropertyGroup>
69

710
<ItemGroup>
8-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
9-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
10-
<PackageReference Include="NUnit" Version="4.3.2" />
11-
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
11+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" />
12+
<PackageReference Include="NUnit" Version="4.4.0" />
13+
<PackageReference Include="NUnit3TestAdapter" Version="6.0.0" />
1214
</ItemGroup>
1315

1416
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">

tests/NSubstitute.Benchmarks/NSubstitute.Benchmarks.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0</TargetFrameworks>
4+
<TargetFrameworks>net10.0</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="BenchmarkDotNet" Version="0.15.0" />
9+
<PackageReference Include="BenchmarkDotNet" Version="0.15.8" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

0 commit comments

Comments
 (0)