Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 11 Jun 22:05
· 229 commits to main since this release
v0.7.0
7735b7f

[0.7.0] - 2026-06-11: key-existence scope-property assertion

Minor release. Adds a key-only WithScopeProperty(string key) overload for asserting a scope property is present without asserting its value. Purely additive.

Added

  • WithScopeProperty(string key) on LogFilter and on the HasLogged() / HasNotLogged() chain asserts that a record carried a scope property at key, regardless of its value (a null value still counts as present). The existing two-argument overloads assert a value; this one asserts only presence. It covers the common case of a scope whose value is set at the production log site and is not visible to the test, such as a caller-info scope (CallerFile / CallerLine / CallerMember from [CallerFilePath] / [CallerLineNumber] / [CallerMemberName]). Pairs with HasNotLogged().WithScopeProperty(key) to assert a scope key was never attached.

Changed

  • README adds a "Prefer structured matchers over substring matching" guide under the migration section: a table mapping common .Containing("...") shapes to the structured matcher that is more robust (.WithProperty, .WithException<T>, .WithScopeProperty, .WithMessageTemplate, HasLoggedSequence), with the rationale that substring matching couples a test to rendered message text that rots when a template is reworded.
  • Bumped PackageValidationBaselineVersion from 0.6.1 to 0.6.3 on both packages so ApiCompat strict-mode validates 0.7.0 against the most recently published baseline. The new overload is recorded as an additive difference in CompatibilitySuppressions.xml.