Skip to content

Commit 3976616

Browse files
authored
Merge pull request #215 from egil/dev
beta-10
2 parents b2b0fdb + e238738 commit 3976616

File tree

60 files changed

+1274
-646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1274
-646
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
dotnet-version: '3.1.x'
3636
- uses: actions/setup-dotnet@v1
3737
with:
38-
dotnet-version: '5.0.100-preview.8.20417.9'
38+
dotnet-version: '5.0.100-rc.1.20452.10'
3939
- name: DOTNET HACK
4040
shell: pwsh
4141
run: |

.github/workflows/main.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
dotnet-version: '3.1.x'
4040
- uses: actions/setup-dotnet@v1
4141
with:
42-
dotnet-version: '5.0.100-preview.8.20417.9'
42+
dotnet-version: '5.0.100-rc.1.20452.10'
4343
- name: Move .net SDK's to shared folder (hack)
4444
shell: pwsh
4545
run: |
@@ -70,7 +70,7 @@ jobs:
7070
dotnet-version: '3.1.x'
7171
- uses: actions/setup-dotnet@v1
7272
with:
73-
dotnet-version: '5.0.100-preview.8.20417.9'
73+
dotnet-version: '5.0.100-rc.1.20452.10'
7474
- name: Move .net SDK's to shared folder (hack)
7575
shell: pwsh
7676
run: |
@@ -85,7 +85,9 @@ jobs:
8585
}
8686
8787
- name: Running unit tests
88-
run: dotnet test -c Debug /nowarn:CS1591 /p:CollectCoverage=true /p:CoverletOutput=./coverage/ /p:CoverletOutputFormat=opencover /p:ExcludeByAttribute=\"Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute\" /p:UseSourceLink=true
88+
run: |
89+
dotnet build -c Debug /nowarn:CS1591 /p:UseSourceLink=true
90+
dotnet test -c Debug --no-build /nowarn:CS1591 /p:CollectCoverage=true /p:CoverletOutput=./coverage/ /p:CoverletOutputFormat=opencover /p:ExcludeByAttribute=\"Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute\" /p:UseSourceLink=true
8991
9092
- name: Upload coverage to Codecov
9193
uses: codecov/codecov-action@v1
@@ -121,7 +123,7 @@ jobs:
121123
dotnet-version: '3.1.x'
122124
- uses: actions/setup-dotnet@v1
123125
with:
124-
dotnet-version: '5.0.100-preview.8.20417.9'
126+
dotnet-version: '5.0.100-rc.1.20452.10'
125127
- name: Move .net SDK's to shared folder (hack)
126128
shell: pwsh
127129
run: |
@@ -137,6 +139,7 @@ jobs:
137139
138140
- name: Creating library package
139141
run: |
142+
dotnet restore
140143
dotnet pack src/bunit.core/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH -p:ContinuousIntegrationBuild=true
141144
dotnet pack src/bunit.web/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH -p:ContinuousIntegrationBuild=true
142145
dotnet pack src/bunit.xunit/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH -p:ContinuousIntegrationBuild=true
@@ -165,7 +168,7 @@ jobs:
165168
dotnet-version: '3.1.x'
166169
- uses: actions/setup-dotnet@v1
167170
with:
168-
dotnet-version: '5.0.100-preview.8.20417.9'
171+
dotnet-version: '5.0.100-rc.1.20452.10'
169172
- name: Move .net SDK's to shared folder (hack)
170173
shell: pwsh
171174
run: |
@@ -234,7 +237,7 @@ jobs:
234237
dotnet-version: '3.1.x'
235238
- uses: actions/setup-dotnet@v1
236239
with:
237-
dotnet-version: '5.0.100-preview.8.20417.9'
240+
dotnet-version: '5.0.100-rc.1.20452.10'
238241
- name: Move .net SDK's to shared folder (hack)
239242
shell: pwsh
240243
run: |
@@ -292,7 +295,7 @@ jobs:
292295
dotnet-version: '3.1.x'
293296
- uses: actions/setup-dotnet@v1
294297
with:
295-
dotnet-version: '5.0.100-preview.8.20417.9'
298+
dotnet-version: '5.0.100-rc.1.20452.10'
296299
- name: DOTNET HACK
297300
shell: pwsh
298301
run: |
@@ -316,9 +319,9 @@ jobs:
316319
- name: Creating library package for release
317320
if: github.event_name == 'release'
318321
run: |
319-
dotnet pack -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH -p:ContinuousIntegrationBuild=true /p:PublicRelease=true
320-
dotnet pack src/bunit/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH -p:ContinuousIntegrationBuild=true /p:PublicRelease=true
321-
dotnet pack src/bunit.template/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH -p:ContinuousIntegrationBuild=true /p:PublicRelease=true
322+
dotnet pack -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=main -p:ContinuousIntegrationBuild=true /p:PublicRelease=true
323+
dotnet pack src/bunit/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=main -p:ContinuousIntegrationBuild=true /p:PublicRelease=true
324+
dotnet pack src/bunit.template/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=main -p:ContinuousIntegrationBuild=true /p:PublicRelease=true
322325
323326
- name: Push packages to GitHub Package Registry
324327
run: |

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to **bUnit** will be documented in this file. The project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [1.0.0-beta 10] - 2020-09-15
6+
7+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
8+
9+
### Added
10+
List of new features.
11+
12+
- Added support for .NET 5 RC-1.
13+
14+
### Changed
15+
List of changes in existing functionality.
16+
17+
- Related to [#189](https://github.com/egil/bUnit/issues/189), a bunch of the core `ITestRenderer` and related types have changed. The internals of `ITestRenderer` is now less exposed and the test renderer is now in control of when rendered components and rendered fragments are created, and when they are updated. This enables the test renderer to protect against race conditions when the `FindComponent`, `FindComponents`, `RenderFragment`, and `RenderComponent` methods are called.
18+
19+
### Fixed
20+
List of any bug fixes.
21+
22+
- Fixes [#189](https://github.com/egil/bUnit/issues/189): The test renderer did not correctly protect against a race condition during initial rendering of a component, and that could in some rare circumstances cause a test to fail when it should not. This has been addressed in this release with a major rewrite of the test renderer, which now controls and owns the rendered component and rendered fragment instances which is created when a component is rendered. By [@egil](https://github.com/egil) in [#201](https://github.com/egil/bUnit/pull/201). Credits to [@Smurf-IV](https://github.com/Smurf-IV) for reporting and helping investigate this issue.
23+
524
## [1.0.0-beta-9] - 2020-08-26
625

726
This release contains a couple of fixes, and adds support for .NET Preview 8 and later. There are no breaking changes in this release.

bunit.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ EndProject
1919
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6EA09ED4-B714-4E6F-B0E1-4D987F8AE520}"
2020
ProjectSection(SolutionItems) = preProject
2121
tests\Directory.Build.props = tests\Directory.Build.props
22+
tests\run-tests.ps1 = tests\run-tests.ps1
2223
EndProjectSection
2324
EndProject
2425
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".text", ".text", "{392FCD4E-356A-412A-A854-8EE197EA65B9}"
Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
55
<RazorLangVersion>3.0</RazorLangVersion>
66
<RootNamespace>Bunit.Docs.Samples</RootNamespace>
77
</PropertyGroup>
88

9+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
10+
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1" />
11+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1" />
14+
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="3.1" />
15+
</ItemGroup>
916

10-
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.4" />
12-
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="3.1.4" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.4" />
14-
</ItemGroup>
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
18+
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0-rc.1.*" />
19+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-rc.1.*" />
20+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="5.0.0-rc.1.*" />
21+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.0-rc.1.*" />
22+
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.0-rc.1.*" />
23+
</ItemGroup>
1524

1625
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
4+
<IsPackable>false</IsPackable>
5+
<LangVersion>8.0</LangVersion>
6+
<RazorLangVersion>3.0</RazorLangVersion>
7+
</PropertyGroup>
8+
</Project>

docs/samples/tests/mstest/bunit.docs.mstest.samples.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<IsPackable>false</IsPackable>
64
<RootNamespace>Bunit.Docs.Samples</RootNamespace>
75
</PropertyGroup>
86

docs/samples/tests/nunit/bunit.docs.nunit.samples.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<IsPackable>false</IsPackable>
64
<RootNamespace>Bunit.Docs.Samples</RootNamespace>
75
</PropertyGroup>
86

9-
<ItemGroup>
7+
<ItemGroup>
108
<PackageReference Include="nunit" Version="3.12.0" />
119
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
1210
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0"/>

docs/samples/tests/razor/bunit.docs.razor.samples.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<RazorLangVersion>3.0</RazorLangVersion>
64
<RootNamespace>Bunit.Docs.Samples</RootNamespace>
7-
<AssemblyName>bunit.docs.razor.samples</AssemblyName>
5+
<AssemblyName>bunit.docs.razor.samples</AssemblyName>
86
</PropertyGroup>
97

108
<ItemGroup>

docs/samples/tests/xunit/bunit.docs.xunit.samples.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<RazorLangVersion>3.0</RazorLangVersion>
64
<RootNamespace>Bunit.Docs.Samples</RootNamespace>
75
</PropertyGroup>
86

0 commit comments

Comments
 (0)