Skip to content

Implement soft assertion #6

@oknozor

Description

@oknozor

it would be nice to have soft assertions.

The API could look like this :

   let softly = SoftAssertions::new();
   softly.assert_that(mansion.guests()).as("Living guest").is_equal_to(7);
   softly.assert_that(mansion.kitchen()).as("Kitchen").is_equal_to("clean");
   softly.asser_that(mansion.library()).as("Library").is_equal_to("clean");
   softly.assert_all();

resulting in the following :

 1) [Living Guests] expected:<[7]> but was:<[6]>
 2) [Library] expected:<"clean"> but was:<"messy">
 3) [Kitchen] expected:<"clean"> but was:<"dirty">

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions