Skip to content

Commit 229ff7f

Browse files
authored
V10.1.2/service update (#139)
🔧 add skip benchmarks option for benchmark runner 📝 add guidance to avoid internalsvisibleto in test projects 🔬 rename benchmark class and update report with new results ⬆️ bump dependecies 📦️ updated NuGet package definition 📝 add nuget prompt for populating PackageReleaseNotes.txt files
1 parent 2a12333 commit 229ff7f

54 files changed

Lines changed: 425 additions & 101 deletions

File tree

Some content is hidden

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

.docfx/Dockerfile.docfx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NGINX_VERSION=1.29.3-alpine
1+
ARG NGINX_VERSION=1.29.4-alpine
22

33
FROM --platform=$BUILDPLATFORM nginx:${NGINX_VERSION} AS base
44
RUN rm -rf /usr/share/nginx/html/*

.github/copilot-instructions.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,37 @@ namespace Cuemon
152152
For further examples, refer to existing test files such as
153153
[`test/Cuemon.Core.Tests/DisposableTest.cs`](test/Cuemon.Core.Tests/DisposableTest.cs) and [`test/Cuemon.Core.Tests/Security/HashFactoryTest.cs`](test/Cuemon.Core.Tests/Security/HashFactoryTest.cs).
154154

155+
## 9. Avoid `InternalsVisibleTo` in Tests
156+
157+
- **Do not** use `InternalsVisibleTo` to access internal types or members from test projects.
158+
- Prefer **indirect testing via public APIs** that depend on the internal implementation (public facades, public extension methods, or other public entry points).
159+
160+
### Preferred Pattern
161+
162+
**Pattern name:** Public Facade Testing (also referred to as *Public API Proxy Testing*)
163+
164+
**Description:**
165+
Internal classes and methods must be validated by exercising the public API that consumes them. Tests should assert observable behavior exposed by the public surface rather than targeting internal implementation details directly.
166+
167+
### Example Mapping
168+
169+
- **Internal helper:** `DelimitedString` (internal static class)
170+
- **Public API:** `TestOutputHelperExtensions.WriteLines()` (public extension method)
171+
- **Test strategy:** Write tests for `WriteLines()` and verify its public behavior. The internal call to `DelimitedString.Create()` is exercised implicitly.
172+
173+
### Benefits
174+
175+
- Avoids exposing internal types to test assemblies.
176+
- Ensures tests reflect real-world usage patterns.
177+
- Maintains strong encapsulation and a clean public API.
178+
- Tests remain resilient to internal refactoring as long as public behavior is preserved.
179+
180+
### When to Apply
181+
182+
- Internal logic is fully exercised through existing public APIs.
183+
- Public entry points provide sufficient coverage of internal code paths.
184+
- The internal implementation exists solely as a helper or utility for public-facing functionality.
185+
155186
---
156187
description: 'Writing Performance Tests in Cuemon'
157188
applyTo: "tuning/**, **/*Benchmark*.cs"

.github/prompts/nuget.prompt.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
mode: agent
3+
description: 'Prompt for populating PackageReleaseNotes.txt files under .nuget/**'
4+
params:
5+
version: '10.0.0'
6+
---
7+
8+
Purpose: deterministic, low-analysis instructions so automated runs prepend a single, consistent release block.
9+
10+
Behavior (exact):
11+
- For every file matching `.nuget/**/PackageReleaseNotes.txt`:
12+
1. Read the file and find the first line that starts with `Availability:` (case-sensitive).
13+
2. If found, capture the remainder of that line as `previous-tfm` and prepend the exact template shown below (substituting `{{version}}` and `{{previous-tfm}}`).
14+
3. If not found within the first 3 lines, do nothing for that file.
15+
4. Apply the template exactly as shown, preserving all whitespace and blank lines (including NBSP U+00A0 characters).
16+
5. Save the file in-place - do not open PRs or create branches.
17+
6. Continue to the next file until all matching files have been processed.
18+
7. Do not assume that each file are the same - process each file independently.
19+
20+
Exact template to prepend (preserve whitespace and trailing NBSP U+00A0 on the blank lines):
21+
```
22+
Version {{version}}
23+
Availability: {{previous-tfm}}
24+
 
25+
# ALM
26+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
27+
 
28+
```
29+
Notes:
30+
- Do not attempt to infer versions or parse changelogs — use the provided `params.version` value.
31+
- Keep edits minimal: only prepend the template block; preserve the rest of the file unchanged for human interference.
32+
- DO NOT REMOVE THE ASCII 0xA0 NBSP CHARACTERS OR RUN ANY SORT OF TRIM on the blank lines in the template!
33+
- DO NOT RUN ANY SORT OF GIT COMMANDS - once the files are saved, you are done.
34+
35+
Example run command (agent):
36+
`run: /nuget version={{version}}`

.nuget/Cuemon.AspNetCore.App/PackageReleaseNotes.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 10.1.2
2+
Availability: .NET 10 and .NET 9
3+
4+
# ALM
5+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
6+
17
Version 10.1.1
28
Availability: .NET 10 and .NET 9
39

@@ -84,4 +90,4 @@ Availability: .NET 9 and .NET 8
8490
# ALM
8591
- CHANGED Dependencies to latest and greatest with respect to TFMs
8692
- REMOVED Support for TFM .NET 6 (LTS)
87-
 
93+
 

.nuget/Cuemon.AspNetCore.Authentication/PackageReleaseNotes.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 10.1.2
2+
Availability: .NET 10 and .NET 9
3+
4+
# ALM
5+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
6+
17
Version 10.1.1
28
Availability: .NET 10 and .NET 9
39

@@ -103,4 +109,4 @@ Availability: .NET 9 and .NET 8
103109
# ALM
104110
- CHANGED Dependencies to latest and greatest with respect to TFMs
105111
- REMOVED Support for TFM .NET 6 (LTS)
106-
 
112+
 

.nuget/Cuemon.AspNetCore.Mvc/PackageReleaseNotes.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 10.1.2
2+
Availability: .NET 10 and .NET 9
3+
4+
# ALM
5+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
6+
17
Version 10.1.1
28
Availability: .NET 10 and .NET 9
39

@@ -88,4 +94,4 @@ Availability: .NET 9 and .NET 8
8894
# Improvements
8995
- EXTENDED ExceptionDescriptorResult class in the Cuemon.AspNetCore.Mvc namespace to have an extra overload that accepts ProblemDetails
9096
- CHANGED FaultDescriptorFilter class in the Cuemon.AspNetCore.Mvc.Filters.Diagnostics namespace to support preferred fault descriptor (e.g., FaultDetails or ProblemDetails)
91-
 
97+
 

.nuget/Cuemon.AspNetCore.Razor.TagHelpers/PackageReleaseNotes.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 10.1.2
2+
Availability: .NET 10 and .NET 9
3+
4+
# ALM
5+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
6+
17
Version 10.1.1
28
Availability: .NET 10 and .NET 9
39

@@ -84,4 +90,4 @@ Availability: .NET 9 and .NET 8
8490
# ALM
8591
- CHANGED Dependencies to latest and greatest with respect to TFMs
8692
- REMOVED Support for TFM .NET 6 (LTS)
87-
 
93+
 

.nuget/Cuemon.AspNetCore/PackageReleaseNotes.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 10.1.2
2+
Availability: .NET 10 and .NET 9
3+
4+
# ALM
5+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
6+
17
Version 10.1.1
28
Availability: .NET 10 and .NET 9
39

@@ -94,4 +100,4 @@ Availability: .NET 9 and .NET 8
94100
# Improvements
95101
- EXTENDED FaultDescriptorOptions class in the Cuemon.AspNetCore.Diagnostics namespace to include a property named FaultDescriptor (PreferredFaultDescriptor); default is PreferredFaultDescriptor.FaultDetails
96102
- EXTENDED HttpExceptionDescriptor class in the Cuemon.AspNetCore.Diagnostics namespace to include two new properties; Instance (Uri) and TraceId (string)
97-
 
103+
 

.nuget/Cuemon.Core.App/PackageReleaseNotes.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 10.1.2
2+
Availability: .NET 10, .NET 9 and .NET Standard 2.0
3+
4+
# ALM
5+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
6+
17
Version 10.1.1
28
Availability: .NET 10, .NET 9 and .NET Standard 2.0
39

@@ -146,4 +152,4 @@ Availability: .NET 9, .NET 8 and .NET Standard 2.0
146152
- Cuemon.Security.Cryptography
147153
- Cuemon.Threading
148154
- Cuemon.Xml
149-
 
155+
 

.nuget/Cuemon.Core/PackageReleaseNotes.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 10.1.2
2+
Availability: .NET 10, .NET 9 and .NET Standard 2.0
3+
4+
# ALM
5+
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
6+
17
Version 10.1.1
28
Availability: .NET 10, .NET 9 and .NET Standard 2.0
39

@@ -170,4 +176,4 @@ Availability: .NET 9, .NET 8 and .NET Standard 2.0
170176
- EXTENDED Validator class in the Cuemon namespace with five new methods: ThrowIfContainsReservedKeyword, ThrowIfNotDifferent, ThrowIfDifferent, ThrowIfContainsAny and ThrowIfNotContainsAny
171177
- CHANGED Validator class in the Cuemon namespace to comply with RSPEC-3343
172178
- EXTENDED Decorator class in the Cuemon namespace with an additional method: RawEnclose
173-
 
179+
 

0 commit comments

Comments
 (0)