You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create reusable expectations by inheriting from `Expectation` and returning an `EvaluationResult`.
276
-
277
-
Recommended convention for external/custom expectations:
278
-
- Suffix the type with `Expectation` (e.g., `IsEvenExpectation`)
279
-
- For unary expectations, prefer a static factory method so call sites can use `using static` (e.g., `Assert(IsEven(4))`)
280
-
- For expectations that take a primary value and additional parameters, prefer extension methods for fluent call sites (e.g., `Assert(actual.IsEquivalentTo(expected))`)
275
+
Create reusable expectations using `Expectation.From()` - a lambda-based factory that eliminates boilerplate:
0 commit comments