Repository navigation
v0.7.0
[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)onLogFilterand on theHasLogged()/HasNotLogged()chain asserts that a record carried a scope property atkey, regardless of its value (anullvalue 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/CallerMemberfrom[CallerFilePath]/[CallerLineNumber]/[CallerMemberName]). Pairs withHasNotLogged().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
PackageValidationBaselineVersionfrom0.6.1to0.6.3on both packages so ApiCompat strict-mode validates0.7.0against the most recently published baseline. The new overload is recorded as an additive difference inCompatibilitySuppressions.xml.