Skip to content

Commit 01fdcef

Browse files
committed
Merge branch 'main' into v2
# Conflicts: # src/bunit.web/Extensions/TestServiceProviderExtensions.cs # src/bunit.web/bunit.web.csproj # tests/Directory.Build.props # version.json
2 parents 79e404d + 14930f4 commit 01fdcef

File tree

95 files changed

+1372
-651
lines changed

Some content is hidden

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

95 files changed

+1372
-651
lines changed

.github/workflows/prepare-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ jobs:
5656
id: versions
5757
run: |
5858
nbgv prepare-release --versionIncrement ${{ github.event.inputs.versionIncrement }}
59-
echo "{MAIN_VERSION_COMMIT_MESSAGE}={$(git log --format=%B -n 1 --skip 1)}" >> $GITHUB_OUTPUT
59+
echo "MAIN_VERSION_COMMIT_MESSAGE=$(git log --format=%B -n 1 --skip 1)" >> $GITHUB_OUTPUT
6060
git checkout release/v$NBGV_MajorMinorVersion
61-
echo "{RELEASE_VERSION_COMMIT_MESSAGE}={$(git log --format=%B -n 1)}" >> $GITHUB_OUTPUT
61+
echo "RELEASE_VERSION_COMMIT_MESSAGE=$(git log --format=%B -n 1)" >> $GITHUB_OUTPUT
6262
6363
# Workaround since nbgv prepare-release does not sign commits.
6464
# This undo's the commits, keeps the version changes, and commits again with signing

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ All notable changes to **bUnit** will be documented in this file. The project ad
66

77
## [Unreleased]
88

9+
## [1.14.4] - 2023-01-11
10+
11+
### Added
12+
13+
- Added `IMemoryCache` by default to the Services container. By [@linkdotnet](https://github.com/linkdotnet).
14+
15+
### Fixed
16+
17+
- Added support in `FakeNavigationManager` to handle umlauts.
18+
- Fixed a bug where attribute values did not get escaped. Reported by [@brettwinters](https://github.com/brettwinters). Fixed by [@linkdotnet](https://github.com/linkdotnet).
19+
20+
## [1.13.5] - 2022-12-16
21+
22+
This release contains a bunch of small tweaks and fixes.
23+
924
## [1.12.6] - 2022-11-08
1025

1126
### Fixed
@@ -1224,7 +1239,11 @@ The latest version of the library is availble on NuGet:
12241239
- **Wrong casing on keyboard event dispatch helpers.**
12251240
The helper methods for the keyboard events was not probably cased, so that has been updated. E.g. from `Keypress(...)` to `KeyPress(...)`.
12261241
1227-
[Unreleased]: https://github.com/bUnit-dev/bUnit/compare/v1.12.6...HEAD
1242+
[Unreleased]: https://github.com/bUnit-dev/bUnit/compare/v1.14.4...HEAD
1243+
1244+
[1.14.4]: https://github.com/bUnit-dev/bUnit/compare/v1.13.5...v1.14.4
1245+
1246+
[1.13.5]: https://github.com/bUnit-dev/bUnit/compare/v1.12.6...1.13.5
12281247
12291248
[1.12.6]: https://github.com/bUnit-dev/bUnit/compare/v1.11.7...v1.12.6
12301249

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<!-- Shared code analyzers used for all projects in the solution -->
4747
<ItemGroup Label="Code Analyzers">
4848
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
49-
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.50.0.58025" PrivateAssets="All" />
49+
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.51.0.59060" PrivateAssets="All" />
5050
</ItemGroup>
5151

5252
<ItemGroup Label="Implicit usings"

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ A huge thank you to the [sponsors of my work with bUnit](https://github.com/spon
4444
<table border="0">
4545
<tr>
4646
<td align="center" width="120">
47-
<a href="https://github.com/telerik">
48-
<img src="https://avatars.githubusercontent.com/u/568561?s=200&v=4" alt="@Telerik" class="avatar" width="72" height="72" />
47+
<a href="https://github.com/Progress-Telerik">
48+
<img src="https://avatars.githubusercontent.com/u/57092419?s=460" alt="@Progress-Telerik" class="avatar" width="72" height="72" />
4949
<br />
50-
Telerik
50+
Progress Telerik
5151
</a>
5252
</td>
5353
<td align="center" width="120">
@@ -56,7 +56,14 @@ A huge thank you to the [sponsors of my work with bUnit](https://github.com/spon
5656
<br />
5757
Syncfusion
5858
</a>
59-
</td>
59+
</td>
60+
<td align="center" width="120">
61+
<a href="https://github.com/aws">
62+
<img class="avatar" src="https://avatars.githubusercontent.com/u/2232217?s=200&v=4" width="72" height="72" alt="@aws" />
63+
<br />
64+
Amazon Web Services
65+
</a>
66+
</td>
6067
<td align="center" width="120">
6168
<a href="https://github.com/hassanhabib">
6269
<img src="https://avatars.githubusercontent.com/u/1453985?s=460" alt="Hassan Rezk Habib (@hassanhabib)" width="72" height="72" class="avatar" />

benchmark/bunit.benchmarks/bunit.benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
11+
<PackageReference Include="BenchmarkDotNet" Version="0.13.4" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

docs/site/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ A huge thank you to the [sponsors of my work with bUnit](https://github.com/spon
6666
<br />
6767
Syncfusion
6868
</a>
69-
</td>
69+
</td>
70+
<td align="center" width="120">
71+
<a href="https://github.com/aws">
72+
<img class="avatar" src="https://avatars.githubusercontent.com/u/2232217?s=200&v=4" width="72" height="72" alt="@aws" />
73+
<br />
74+
Amazon Web Services
75+
</a>
76+
</td>
7077
<td align="center" width="120">
7178
<a href="https://github.com/hassanhabib">
7279
<img src="https://avatars.githubusercontent.com/u/1453985?s=460" alt="Hassan Rezk Habib (@hassanhabib)" width="72" height="72" class="avatar" />

src/AngleSharpWrappers/AngleSharpWrappers.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="AngleSharp" Version="0.17.1" />
20-
<PackageReference Include="AngleSharp.Css" Version="0.16.4" />
19+
<PackageReference Include="AngleSharp" Version="1.0.1" />
2120
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
2221
</ItemGroup>
2322

24-
</Project>
23+
</Project>

src/AngleSharpWrappers/Generated/ElementWrapper.g.cs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public sealed class ElementWrapper : Wrapper<IElement>, IElement
1818
/// Creates an instance of the <see cref="ElementWrapper"/> type;
1919
/// </summary>
2020
public ElementWrapper(IElementFactory<IElement> elementFactory) : base(elementFactory) { }
21-
/// <inheritdoc/>
2221

2322
#region Properties and indexers
23+
/// <inheritdoc/>
2424
[DebuggerHidden]
2525
public IElement? AssignedSlot { get => WrappedElement.AssignedSlot; }
2626
/// <inheritdoc/>
@@ -58,6 +58,9 @@ public ElementWrapper(IElementFactory<IElement> elementFactory) : base(elementFa
5858
public NodeFlags Flags { get => WrappedElement.Flags; }
5959
/// <inheritdoc/>
6060
[DebuggerHidden]
61+
public String? GivenNamespaceUri { get => WrappedElement.GivenNamespaceUri; }
62+
/// <inheritdoc/>
63+
[DebuggerHidden]
6164
public Boolean HasChildNodes { get => WrappedElement.HasChildNodes; }
6265
/// <inheritdoc/>
6366
[DebuggerHidden]
@@ -131,10 +134,10 @@ public ElementWrapper(IElementFactory<IElement> elementFactory) : base(elementFa
131134
/// <inheritdoc/>
132135
[DebuggerHidden]
133136
public String TextContent { get => WrappedElement.TextContent; set => WrappedElement.TextContent = value;}
134-
/// <inheritdoc/>
135137
#endregion
136138

137139
#region Methods
140+
/// <inheritdoc/>
138141
[DebuggerHidden]
139142
public void AddEventListener(String type, DomEventHandler? callback, Boolean capture) => WrappedElement.AddEventListener(type, callback, capture);
140143
/// <inheritdoc/>
@@ -184,7 +187,7 @@ public ElementWrapper(IElementFactory<IElement> elementFactory) : base(elementFa
184187
public IHtmlCollection<IElement> GetElementsByTagName(String tagName) => WrappedElement.GetElementsByTagName(tagName);
185188
/// <inheritdoc/>
186189
[DebuggerHidden]
187-
public IHtmlCollection<IElement> GetElementsByTagNameNS(String namespaceUri, String tagName) => WrappedElement.GetElementsByTagNameNS(namespaceUri, tagName);
190+
public IHtmlCollection<IElement> GetElementsByTagNameNS(String? namespaceUri, String tagName) => WrappedElement.GetElementsByTagNameNS(namespaceUri, tagName);
188191
/// <inheritdoc/>
189192
[DebuggerHidden]
190193
public Boolean HasAttribute(String name) => WrappedElement.HasAttribute(name);
@@ -208,7 +211,7 @@ public ElementWrapper(IElementFactory<IElement> elementFactory) : base(elementFa
208211
public String? LookupNamespaceUri(String prefix) => WrappedElement.LookupNamespaceUri(prefix);
209212
/// <inheritdoc/>
210213
[DebuggerHidden]
211-
public String? LookupPrefix(String namespaceUri) => WrappedElement.LookupPrefix(namespaceUri);
214+
public String? LookupPrefix(String? namespaceUri) => WrappedElement.LookupPrefix(namespaceUri);
212215
/// <inheritdoc/>
213216
[DebuggerHidden]
214217
public Boolean Matches(String selectors) => WrappedElement.Matches(selectors);
@@ -232,11 +235,9 @@ public ElementWrapper(IElementFactory<IElement> elementFactory) : base(elementFa
232235
public Boolean RemoveAttribute(String name) => WrappedElement.RemoveAttribute(name);
233236
/// <inheritdoc/>
234237
[DebuggerHidden]
235-
#pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
236-
public Boolean RemoveAttribute(String namespaceUri, String localName) => WrappedElement.RemoveAttribute(namespaceUri, localName);
237-
#pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
238-
/// <inheritdoc/>
239-
[DebuggerHidden]
238+
public Boolean RemoveAttribute(String? namespaceUri, String localName) => WrappedElement.RemoveAttribute(namespaceUri, localName);
239+
/// <inheritdoc/>
240+
[DebuggerHidden]
240241
public INode RemoveChild(INode child) => WrappedElement.RemoveChild(child);
241242
/// <inheritdoc/>
242243
[DebuggerHidden]
@@ -249,10 +250,10 @@ public ElementWrapper(IElementFactory<IElement> elementFactory) : base(elementFa
249250
public INode ReplaceChild(INode newChild, INode oldChild) => WrappedElement.ReplaceChild(newChild, oldChild);
250251
/// <inheritdoc/>
251252
[DebuggerHidden]
252-
public void SetAttribute(String name, String value) => WrappedElement.SetAttribute(name, value);
253+
public void SetAttribute(String name, String? value) => WrappedElement.SetAttribute(name, value);
253254
/// <inheritdoc/>
254255
[DebuggerHidden]
255-
public void SetAttribute(String namespaceUri, String name, String value) => WrappedElement.SetAttribute(namespaceUri, name, value);
256+
public void SetAttribute(String? namespaceUri, String name, String? value) => WrappedElement.SetAttribute(namespaceUri, name, value);
256257
/// <inheritdoc/>
257258
[DebuggerHidden]
258259
public void ToHtml(TextWriter writer, IMarkupFormatter formatter) => WrappedElement.ToHtml(writer, formatter);

src/AngleSharpWrappers/Generated/HtmlAnchorElementWrapper.g.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public sealed class HtmlAnchorElementWrapper : Wrapper<IHtmlAnchorElement>, IHtm
1919
/// Creates an instance of the <see cref="HtmlAnchorElementWrapper"/> type;
2020
/// </summary>
2121
public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFactory) : base(elementFactory) { }
22-
/// <inheritdoc/>
2322

2423
#region Events
24+
/// <inheritdoc/>
2525
public event DomEventHandler Aborted { add => WrappedElement.Aborted += value; remove => WrappedElement.Aborted -= value; }
2626
/// <inheritdoc/>
2727
public event DomEventHandler Blurred { add => WrappedElement.Blurred += value; remove => WrappedElement.Blurred -= value; }
@@ -137,10 +137,10 @@ public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFacto
137137
public event DomEventHandler VolumeChanged { add => WrappedElement.VolumeChanged += value; remove => WrappedElement.VolumeChanged -= value; }
138138
/// <inheritdoc/>
139139
public event DomEventHandler Waiting { add => WrappedElement.Waiting += value; remove => WrappedElement.Waiting -= value; }
140-
/// <inheritdoc/>
141140
#endregion
142141

143142
#region Properties and indexers
143+
/// <inheritdoc/>
144144
[DebuggerHidden]
145145
public String? AccessKey { get => WrappedElement.AccessKey; set => WrappedElement.AccessKey = value;}
146146
/// <inheritdoc/>
@@ -202,6 +202,9 @@ public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFacto
202202
public NodeFlags Flags { get => WrappedElement.Flags; }
203203
/// <inheritdoc/>
204204
[DebuggerHidden]
205+
public String? GivenNamespaceUri { get => WrappedElement.GivenNamespaceUri; }
206+
/// <inheritdoc/>
207+
[DebuggerHidden]
205208
public Boolean HasChildNodes { get => WrappedElement.HasChildNodes; }
206209
/// <inheritdoc/>
207210
[DebuggerHidden]
@@ -353,10 +356,10 @@ public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFacto
353356
/// <inheritdoc/>
354357
[DebuggerHidden]
355358
public String? UserName { get => WrappedElement.UserName; set => WrappedElement.UserName = value;}
356-
/// <inheritdoc/>
357359
#endregion
358360

359361
#region Methods
362+
/// <inheritdoc/>
360363
[DebuggerHidden]
361364
public void AddEventListener(String type, DomEventHandler? callback, Boolean capture) => WrappedElement.AddEventListener(type, callback, capture);
362365
/// <inheritdoc/>
@@ -418,7 +421,7 @@ public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFacto
418421
public IHtmlCollection<IElement> GetElementsByTagName(String tagName) => WrappedElement.GetElementsByTagName(tagName);
419422
/// <inheritdoc/>
420423
[DebuggerHidden]
421-
public IHtmlCollection<IElement> GetElementsByTagNameNS(String namespaceUri, String tagName) => WrappedElement.GetElementsByTagNameNS(namespaceUri, tagName);
424+
public IHtmlCollection<IElement> GetElementsByTagNameNS(String? namespaceUri, String tagName) => WrappedElement.GetElementsByTagNameNS(namespaceUri, tagName);
422425
/// <inheritdoc/>
423426
[DebuggerHidden]
424427
public Boolean HasAttribute(String name) => WrappedElement.HasAttribute(name);
@@ -442,7 +445,7 @@ public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFacto
442445
public String? LookupNamespaceUri(String prefix) => WrappedElement.LookupNamespaceUri(prefix);
443446
/// <inheritdoc/>
444447
[DebuggerHidden]
445-
public String? LookupPrefix(String namespaceUri) => WrappedElement.LookupPrefix(namespaceUri);
448+
public String? LookupPrefix(String? namespaceUri) => WrappedElement.LookupPrefix(namespaceUri);
446449
/// <inheritdoc/>
447450
[DebuggerHidden]
448451
public Boolean Matches(String selectors) => WrappedElement.Matches(selectors);
@@ -466,7 +469,7 @@ public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFacto
466469
public Boolean RemoveAttribute(String name) => WrappedElement.RemoveAttribute(name);
467470
/// <inheritdoc/>
468471
[DebuggerHidden]
469-
public Boolean RemoveAttribute(String namespaceUri, String localName) => WrappedElement.RemoveAttribute(namespaceUri, localName);
472+
public Boolean RemoveAttribute(String? namespaceUri, String localName) => WrappedElement.RemoveAttribute(namespaceUri, localName);
470473
/// <inheritdoc/>
471474
[DebuggerHidden]
472475
public INode RemoveChild(INode child) => WrappedElement.RemoveChild(child);
@@ -481,10 +484,10 @@ public HtmlAnchorElementWrapper(IElementFactory<IHtmlAnchorElement> elementFacto
481484
public INode ReplaceChild(INode newChild, INode oldChild) => WrappedElement.ReplaceChild(newChild, oldChild);
482485
/// <inheritdoc/>
483486
[DebuggerHidden]
484-
public void SetAttribute(String name, String value) => WrappedElement.SetAttribute(name, value);
487+
public void SetAttribute(String name, String? value) => WrappedElement.SetAttribute(name, value);
485488
/// <inheritdoc/>
486489
[DebuggerHidden]
487-
public void SetAttribute(String namespaceUri, String name, String value) => WrappedElement.SetAttribute(namespaceUri, name, value);
490+
public void SetAttribute(String? namespaceUri, String name, String? value) => WrappedElement.SetAttribute(namespaceUri, name, value);
488491
/// <inheritdoc/>
489492
[DebuggerHidden]
490493
public void ToHtml(TextWriter writer, IMarkupFormatter formatter) => WrappedElement.ToHtml(writer, formatter);

0 commit comments

Comments
 (0)