Skip to main content

cupel_testing/
lib.rs

1pub mod chain;
2
3pub use chain::SelectionReportAssertionChain;
4
5use cupel::SelectionReport;
6
7/// Extension trait that provides fluent assertion entry on [`SelectionReport`].
8///
9/// Import this trait and call `.should()` on any `SelectionReport` to start
10/// an assertion chain:
11///
12/// ```ignore
13/// use cupel_testing::SelectionReportAssertions;
14///
15/// report.should()
16///     .have_included_count(3);
17/// ```
18pub trait SelectionReportAssertions {
19    /// Begin a fluent assertion chain on this report.
20    fn should(&self) -> SelectionReportAssertionChain<'_>;
21}
22
23impl SelectionReportAssertions for SelectionReport {
24    fn should(&self) -> SelectionReportAssertionChain<'_> {
25        SelectionReportAssertionChain::new(self)
26    }
27}