{"id":26555282,"url":"https://github.com/innoave/asserting","last_synced_at":"2026-07-03T14:32:39.407Z","repository":{"id":282755188,"uuid":"937279157","full_name":"innoave/asserting","owner":"innoave","description":"Fluent assertions for tests in Rust that are convenient to write and easy to extend","archived":false,"fork":false,"pushed_at":"2026-06-22T21:43:03.000Z","size":748,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-30T20:29:50.959Z","etag":null,"topics":["assertions","fluent","matchers","no-std","rust-lang","testing"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/asserting","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/innoave.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-22T18:56:46.000Z","updated_at":"2026-06-19T19:52:56.000Z","dependencies_parsed_at":"2026-01-11T02:01:57.432Z","dependency_job_id":null,"html_url":"https://github.com/innoave/asserting","commit_stats":null,"previous_names":["innoave/asserting"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/innoave/asserting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innoave%2Fasserting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innoave%2Fasserting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innoave%2Fasserting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innoave%2Fasserting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/innoave","download_url":"https://codeload.github.com/innoave/asserting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innoave%2Fasserting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35090435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assertions","fluent","matchers","no-std","rust-lang","testing"],"created_at":"2025-03-22T10:25:51.991Z","updated_at":"2026-07-03T14:32:39.390Z","avatar_url":"https://github.com/innoave.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asserting\n\n[![crates.io][crates-badge]][crates-url]\n[![docs.rs][docs-badge]][docs-url]\n![MSRV][msrv-badge]\n[![code coverage][code-coverage-badge]][code-coverage-url]\n\nFluent assertions for tests in Rust that are convenient to write and easy to extend.\n\nFeatures of `asserting`:\n\n1. assertions are convenient to write and easy to read\n2. helpful error messages in case of failing assertions\n3. colored diffs between expected and actual values\n   (see [\"Highlighted differences\"](#highlighted-differences))\n4. chaining of multiple assertions on the same subject (see [\"Chaining assertions\"])\n5. field-by-field recursive comparison (see [\"Field-by-field recursive comparison\"]) :new:\n6. soft assertions (execute multiple assertions before panicking) (see [\"Soft assertions\"])\n7. provide a reasonable number of assertions out of the box\n8. do not require that asserted types have to implement traits if it is not absolutely necessary\n9. support for asserting custom types with provided assertions\n10. writing custom assertions requires minimal effort\n11. support no-std environments\n\nFor an overview of the provided features and many examples on how to use `asserting` see the\n[crate-level documentation][docs-url].\n\nThe assertion methods are mostly inspired by the [AssertJ] library for Java but adopted to Rust's\nsyntax and idioms.\n\nTo see what is changed with each release, see the [changelog](CHANGELOG.md).\n\n### Convenient to write\n\nCode editors and IDEs help with autocomplete to find the right method for the kind of assertion we\nwant to write. The API docs of the assertions contain examples to help with writing assertions.\n\nThe expected value does not need to be exactly of the same type as the subject. For example, instead\nof writing:\n\n```rust\n#[test]\nfn the_message_is_right() {\n    let message = \"lorem consectetur ipsum exercitation\".to_string();\n\n    assert_that!(message).is_equal_to(\"lorem consectetur ipsum exercitation\".to_string());\n}\n```\n\nwith `asserting` we can write:\n\n```rust\n#[test]\nfn the_message_is_right() {\n    let message = \"lorem consectetur ipsum exercitation\".to_string();\n\n    assert_that!(message).is_equal_to(\"lorem consectetur ipsum exercitation\");\n}\n```\n\nNote that we do not convert the expected value to a `String`.\n\nThis might seem to be a minor advantage, but when writing assertions for a collection of `String`s,\nconverting every expected `\u0026str` to `String` results in lots of noise.\n\n### Easy to extend\n\nEasy-to-extend means that we can write assertions for custom types with minimal effort.\n\n`asserting` provides three kinds of custom assertions:\n\n1. use any predicate function as a custom assertion (see \"[predicate as custom assertion]\")\n2. property-based assertions can be used with any type that implements the related property\n   (see \"[property-based assertions]\")\n3. write custom assertion methods by defining and implementing an extension trait\n   (see \"[custom assertions]\")\n\nThe mentioned references link to a chapter in the crate's documentation that describes the\npossibilities for custom assertions, including examples.\n\n## no-std support\n\nTo use `asserting` in a no-std environment disable the default features. Features that do not\nrequire std can still be added.\n\n```toml\n[dev-dependencies]\nasserting = { version = \"0.14\", default-features = false, features = [\"colored\", \"float-cmp\", \"recursive\", \"regex\"] }\n```\n\nAn allocator is still needed for no-std.\n\n## Crate Features\n\nOverview of the crate features of `asserting`. The column \"no-std\" specifies if this feature is\navailable in no-std environments. The column \"default\" specifies if this feature is enabled by\ndefault.\n\n| Feature        | Description                                                           | no-std | default |\n|----------------|-----------------------------------------------------------------------|:------:|:-------:|\n| `std`          | Use the `std` library                                                 |   no   |   yes   |\n| `colored`      | Colored highlighting of differences between actual and expected value |  yes   |   yes   |\n| `recursive`    | Field-by-field recursive comparison mode                              |  yes   |   yes   |\n| `float-cmp`    | Floating point comparison (`ìs_close_to`)                             |  yes   |   yes   |\n| `regex`        | String matches Regex assertions (`matching`)                          |  yes   |   yes   |\n| `panic`        | Assert that code panics (with the expected message)                   |   no   |   yes   |\n| `num-bigint`   | Enhanced support for `num-bigint::BigInt`                             |  yes   |   no    |\n| `bigdecimal`   | Enhanced support for `bigdecimal::BigDecimal`                         |  yes   |   no    |\n| `rust-decimal` | Enhanded support for `rust_decimal::Decimal`                          |  yes   |   no    |\n\n## Highlighted differences\n\n`asserting` can highlight the differences between the expected value(s) and the actual value(s) when\nprinting assertion failures to the terminal. The colored diffs in assertion failures look like this:\n\n![colored diffs in terminal](examples/colored_diffs.png)\n\nHighlighted differences in the failure message help with spotting the difference between actual and\nexpected values and make finding the reason for a failing test much easier.\n\nIt supports different variants of how differences are highlighted.\n\n| Mode       | Effect                                                                                                                            |\n|------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| bold       | Differences are printed in bold letters, without coloring.                                                                        | \n| red-green  | Differences are printed in the colors \u003cspan style=\"color: green\"\u003egreen\u003c/span\u003e and \u003cspan style=\"color: red\"\u003ered\u003c/span\u003e.            | \n| red-blue   | Differences are printed in the CVD-friendly colors \u003cspan style=\"color: blue\"\u003eblue\u003c/span\u003e and \u003cspan style=\"color: red\"\u003ered\u003c/span\u003e. | \n| red-yellow | Differences are printed in the colors \u003cspan style=\"color: yellow\"\u003eyellow\u003c/span\u003e and \u003cspan style=\"color: red\"\u003ered\u003c/span\u003e.          | \n| off        | Switches off highlighting. The differences are not highlighted at all.                                                            | \n\nThe mode can be configured by setting the environment variable `ASSERTING_HIGHLIGHT_DIFFS` to one\nof the modes in the table above. The value is case-insensitive. E.g., setting the environment\nvariable to values like `Red-Blue`, `Bold` or `OFF` works as well.\n\nThe intended way for configuring the highlighting mode is to set the environment variable in the\nconfiguration for `Cargo` by adding it to the `[env]` section in your `~/.cargo/config.toml` file:\n\n```toml,no_sync\n[env]\nASSERTING_HIGHLIGHT_DIFFS = \"red-blue\"\n```\n\nBy default, the mode `red-green` is used. Differences are colored in\n\u003cspan style=\"color: green\"\u003egreen\u003c/span\u003e and \u003cspan style=\"color: red\"\u003ered\u003c/span\u003e.\n\nDifferences are only highlighted if the crate feature `colored` is enabled. The configuration via\nthe environment variable only works when the crate feature `std` is enabled too. In no-std projects,\nthe default colors red and green are used.\n\n*Asserting* respects the [`NO_COLOR`] environment variable. If the `NO_COLOR` environment variable\nis set no colors are used regardless of the configured highlight mode.\n\n## Available Assertions\n\nThis chapter gives an overview for the assertions provided by `asserting`. For a comprehensive list\nof available assertions including examples browse the documentation of the [`assertions`] module.\nThe documentation of the assertion traits contains examples on how to use each assertion. The\n[crate-level documentation][docs-url] contains lots of examples as a quick introduction.\n\n### Equality\n\nfor all types that implement `PartialEq\u003cE\u003e` with `E` being the type of the expected value:\n\n| assertion       | description                                              |\n|-----------------|----------------------------------------------------------|\n| is_equal_to     | verify that the subject is equal to an expected value    |\n| is_not_equal_to | verify that the subject is not equal to a specific value |\n\nfor all types that implement `PartialEq` and the subject is of the same type as the expected\nvalue:\n\n| assertion      | description                                                                                   |\n|----------------|-----------------------------------------------------------------------------------------------|\n| is_same_as     | verify that the subject is of the same type and has the same value than the expected value    |\n| is_not_same_as | verify that the subject is of the same type and has a different value than the expected value |\n\n### Order\n\nfor all types that implement `PartialOrd\u003cE\u003e` with `E` being the type of the expected value:\n\n| assertion       | description                                                                            |\n|-----------------|----------------------------------------------------------------------------------------|\n| is_greater_than | verify that the subject is greater than the expected value                             |                                                 \n| is_less_than    | verify that the subject is less than the expected value                                |\n| is_at_least     | verify that the subject is greater than or equal to the expected value                 |                                                 \n| is_at_most      | verify that the subject is less than or equal to the expected value                    |\n| is_before       | verify that the subject is less than (before) the expected value                       |\n| is_after        | verify that the subject is greater than (after) the expected value                     |\n| is_between      | verify that the subject is between a min value (inclusive) and a max value (inclusive) |\n\n### Range\n\nfor all types `T` that implement `PartialOrd\u003cE\u003e` and `E` implementing `PartialOrd\u003cT\u003e` with `E`\nbeing the type of the expected value:\n\n| assertion       | description                                           |\n|-----------------|-------------------------------------------------------|\n| is_in_range     | verify that the subject is in the expected range      |                                                 \n| is_not_in_range | verify that the subject is not in the specified range |\n\n### Integer and Float\n\nfor numbers of types\n\n* integer primitives: `i8`, `i16`, `i32`, `i64`, `i128` and `isize`\n* floating point numbers: `f32` and `f64`\n* `num_bigint::BigInt` (requires crate feature `num-bigint`)\n* `bigdecimal:BigDecimal` and `bigdecimal:BigDecimalRef` (requires crate feature `bigdecimal`)\n* `rust_decimal::Decimal` (requires crate feature `rust-decimal`)\n\n| assertion       | description                                          |\n|-----------------|------------------------------------------------------|\n| is_negative     | verify that the subject is a negative number         |\n| is_not_negative | verify that the subject is a positive number or zero |\n| is_positive     | verify that the subject is a positive number         |\n| is_not_positive | verify that the subject is a finite number           |                                                 \n\nfor numbers of types\n\n* integer primitives: `i8`, `i16`, `i32`, `i64`, `i128`, `isize`, `u8`, `u16`, `u32`, `u64`, `u128`\n  and `usize`\n* floating point numbers: `f32` and `f64`\n* `num_bigint::BigInt` and `num_bigint::BigUint` (requires crate feature `num-bigint`)\n* `bigdecimal:BigDecimal` and `bigdecimal:BigDecimalRef` (requires crate feature `bigdecimal`)\n* `rust_decimal::Decimal` (requires crate feature `rust-decimal`)\n\n| assertion | description                                                  |\n|-----------|--------------------------------------------------------------|\n| is_zero   | verify that the subject is the additive identity (zero)      |                                                 \n| is_one    | verify that the subject is the multiplicative identity (one) |                                                 \n\nfor floating point numbers of type `f32` and `f64`:\n\n| assertion       | description                                   |\n|-----------------|-----------------------------------------------|\n| is_infinite     | verify that the subject is an infinite number |\n| is_finite       | verify that the subject is a finite number    |                                                 \n| is_not_a_number | verify that the subject is not a number       |\n| is_a_number     | verify that the subject is a number           |\n\n### Decimal number\n\nfor decimal numbers of types\n\n* `bigdecimal:BigDecimal` and `bigdecimal:BigDecimalRef` (requires crate feature `bigdecimal`)\n* `rust_decimal::Decimal` (requires crate feature `rust-decimal`)\n\n| assertion        | description                                        |\n|------------------|----------------------------------------------------|\n| has_scale_of     | verify that the subject has the expected scale     |                                                 \n| has_precision_of | verify that the subject has the expected precision |                                                 \n| is_integer       | verify that the subject has zero fractional digits |                                                 \n\n### Float comparison\n\nfor floating point numbers of type `f32` and `f64`.\n\nrequires crate feature `float-cmp` which is enabled by default.\n\n| assertion                   | description                                                                                      |\n|-----------------------------|--------------------------------------------------------------------------------------------------|\n| is_close_to                 | verify that the subject is approximately equal to the expected value within a default margin     |                                                 \n| is_not_close_to             | verify that the subject is not approximately equal to the expected value within a default margin |\n| is_close_to_with_margin     | verify that the subject is approximately equal to the expected value within the given margin     |\n| is_not_close_to_with_margin | verify that the subject is not approximately equal to the expected value within the given margin |\n\n### Character\n\nfor `char`.\n\n| assertion       | description                                                     |\n|-----------------|-----------------------------------------------------------------|\n| is_lowercase    | verify that the character is lowercase                          |\n| is_uppercase    | verify that the character is uppercase                          |                                                 \n| is_ascii        | verify that the character is an ASCII character                 |                                                 \n| is_alphabetic   | verify that the character is an alphabetic character            |\n| is_alphanumeric | verify that the character is an alphabetic character or a digit |\n| is_control_char | verify that the character is a control character                |\n| is_digit        | verify that the character is a digit in the given radix         |\n| is_whitespace   | verify that the character is whitespace                         |\n\n### Boolean\n\nfor `bool`.\n\n| assertion | description                      |\n|-----------|----------------------------------|\n| is_true   | verify that the subject is true  |                                                 \n| is_false  | verify that the subject is false |\n\n### String\n\nfor strings of type `String` and `str`:\n\n| assertion                   | description                                                                      |\n|-----------------------------|----------------------------------------------------------------------------------|\n| is_empty                    | verify that a string is empty                                                    |                                                 \n| is_not_empty                | verify that a string is not empty                                                |\n| has_length                  | verify that a string has exactly the expected length                             |                                                 \n| has_length_in_range         | verify that a string has a length that is in the expected range                  |\n| has_length_less_than        | verify that a string has a length less than the expected length                  |\n| has_length_greater_than     | verify that a string has a length greater than the expected length               |\n| has_at_most_length          | verify that a string has a length less than or equal to the expected length      |\n| has_at_least_length         | verify that a string has a length greater than or equal to the expected length   |\n| has_char_count              | verify that a string contains exactly the expected number of characters          |                                                 \n| has_char_count_in_range     | verify that a string contains a number of characters in the expected range       |\n| has_char_count_less_than    | verify that a string contains less than the expected number of characters        |\n| has_char_count_greater_than | verify that a string contains more than the expected number of characters        |\n| has_at_most_char_count      | verify that a string contains at most the expected number of characters          |\n| has_at_least_char_count     | verify that a string contains at least the expected number of characters         |\n| contains                    | verify that a string contains the expected substring or character                |\n| does_not_contain            | verify that a string does not contain the expected substring or character        |\n| starts_with                 | verify that a string starts with the expected substring or character             |\n| does_not_start_with         | verify that a string does not start with the expected substring or character     |\n| ends_with                   | verify that a string ends with the expected substring or character               |\n| does_not_end_with           | verify that a string does not end with the expected substring or character       |\n| contains_any_of             | verify that a string contains any character from a collection of `char`s         |\n| does_not_contain_any_of     | verify that a string does not contain any character from a collection of `char`s |\n| matches                     | verify that a string matches the given regex (requires `regex` feature)          |                                                 \n| does_not_match              | verify that a string does not match the given regex (requires `regex` feature)   |                                                 \n\nfor strings of type `CString` and `CStr`:\n\n| assertion               | description                                                                    |\n|-------------------------|--------------------------------------------------------------------------------|\n| is_empty                | verify that a string is empty                                                  |                                                 \n| is_not_empty            | verify that a string is not empty                                              |\n| has_length              | verify that a string has exactly the expected length                           |                                                 \n| has_length_in_range     | verify that a string has a length that is in the expected range                |\n| has_length_less_than    | verify that a string has a length less than the expected length                |\n| has_length_greater_than | verify that a string has a length greater than the expected length             |\n| has_at_most_length      | verify that a string has a length less than or equal to the expected length    |\n| has_at_least_length     | verify that a string has a length greater than or equal to the expected length |\n\nfor strings of type `OsString` and `OsStr` (requires crate feature `std`):\n\n| assertion               | description                                                                    |\n|-------------------------|--------------------------------------------------------------------------------|\n| is_empty                | verify that a string is empty                                                  |                                                 \n| is_not_empty            | verify that a string is not empty                                              |\n| has_length              | verify that a string has exactly the expected length                           |                                                 \n| has_length_in_range     | verify that a string has a length that is in the expected range                |\n| has_length_less_than    | verify that a string has a length less than the expected length                |\n| has_length_greater_than | verify that a string has a length greater than the expected length             |\n| has_at_most_length      | verify that a string has a length less than or equal to the expected length    |\n| has_at_least_length     | verify that a string has a length greater than or equal to the expected length |\n\n### Option\n\nfor the `Option` type.\n\n| assertion | description                                                            |\n|-----------|------------------------------------------------------------------------|\n| is_some   | verify that an option has some value                                   |                                                 \n| is_none   | verify that an option has no value                                     |\n| has_value | verify that an option has a value equal to the expected one            |\n| some      | verify that an option has some value and map the subject to this value |\n\n### Result\n\nfor the `Result` type.\n\n| assertion         | description                                                                                              |\n|-------------------|----------------------------------------------------------------------------------------------------------|\n| is_ok             | verify that a result has an ok value                                                                     |                                                 \n| is_err            | verify that a result has an err value                                                                    |\n| has_value         | verify that a result has an ok value that is equal to the expected value                                 |\n| has_error         | verify that a result has an err value that is equal to the expected error                                |\n| has_error_message | verify that a result has an err value with a string representation that is equal to the expected message |\n| ok                | verify that a result has an ok value and map the subject to this ok value                                |\n| err               | verify that a result has an err value and map the subject to this err value                              |\n\n### Error\n\nfor types that implement `std::error::Error`.\n\n| assertion          | description                                                                                        |\n|--------------------|----------------------------------------------------------------------------------------------------|\n| has_no_source      | verify that an error has no source                                                                 |                                                 \n| has_source         | verify that an error has some source                                                               |\n| has_source_message | verify that an error has a source which converts to a string that is equal to the expected message |\n\n### Debug and Display string\n\nfor types that implement `core::fmt::Debug`:\n\n| assertion                  | description                                                                |\n|----------------------------|----------------------------------------------------------------------------|\n| has_debug_string           | verify that a type formatted for debug is equal to the expected string     |                                                 \n| does_not_have_debug_string | verify that a type formatted for debug is not equal to the expected string |\n| debug_string               | map the subject to its debug string representation                         |\n\nfor types that implement `core::fmt::Display`:\n\n| assertion                    | description                                                                  |\n|------------------------------|------------------------------------------------------------------------------|\n| has_display_string           | verify that a type formatted for display is equal to the expected string     |                                                 \n| does_not_have_display_string | verify that a type formatted for display is not equal to the expected string |\n| display_string               | map the subject to its display string representation                         |\n\n### Emptiness\n\nfor collections and strings.\n\n| assertion    | description                          |\n|--------------|--------------------------------------|\n| is_empty     | verify that the subject is empty     |                                                 \n| is_not_empty | verify that the subject is not empty |\n\nThe implementation of these assertions is based on the property trait [`IsEmptyProperty`].\nImplementing this property for any type enables these assertions for that type.\n\n### Length (Size)\n\nfor collections and strings.\n\n| assertion               | description                                                                       |\n|-------------------------|-----------------------------------------------------------------------------------|\n| has_length              | verify that the subject has exactly the expected length                           |                                                 \n| has_length_in_range     | verify that the subject has a length that is in the expected range                |\n| has_length_less_than    | verify that the subject has a length less than the expected length                |\n| has_length_greater_than | verify that the subject has a length greater than the expected length             |\n| has_at_most_length      | verify that the subject has a length less than or equal to the expected length    |\n| has_at_least_length     | verify that the subject has a length greater than or equal to the expected length |\n\nThe implementation of these assertions is based on the property trait [`LengthProperty`].\nImplementing this property for any type enables these assertions for that type.\n\n### Iterator / Collection\n\nfor all iterators.\n\n| assertion                     | description                                                                                                                 |\n|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| contains                      | verify that an iterator/collection contains an item that is equal to the expected value                                     |                                                \n| does_not_contain              | verify that an iterator/collection does not contain an item that is equal to the expected value                             |                                                \n| contains_exactly_in_any_order | verify that an iterator/collection contains exactly the expected values and nothing else in any order                       |\n| contains_any_of               | verify that an iterator/collection contains at least one of the specified values                                            |\n| does_not_contain_any_of       | verify that an iterator/collection does not contain any of the specified values                                             |\n| contains_all_of               | verify that an iterator/collection contains all the expected values in any order (and maybe more)                           |\n| contains_only                 | verify that an iterator/collection contains only the specified values and nothing else in any order and ignoring duplicates |\n| contains_only_once            | verify that an iterator/collection contains only the specified values in any order and each of them only once               |\n| single_element                | verify that an iterator/collection contains exaclty one element and return a `Spec` for that one element                    |\n| filtered_on                   | filter the elements of an iterator/collection on a condition and return a `Spec` that contains the filtered elements        |\n| any_satisfies                 | verify that at least one element of an iterator/collection satisfies a predicate                                            |\n| all_satisfy                   | verify that all elements of an iterator/collection satisfy a predicate                                                      |\n| none_satisfies                | verify that none of the elements of an iterator/collection satisfies a predicate                                            |\n| each_element                  | verify that all elements of an iterator/collection satisfy the given assertions                                             |\n| any_element                   | verify that at least one element of an iterator/collection satisfies the given assertions                                   |\n\nfor iterators that yield items in a well-defined order.\n\n| assertion             | description                                                                                                                                      |\n|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| contains_exactly      | verify that an iterator/collection contains exactly the expected values and nothing else in the given order                                      |\n| contains_sequence     | verify that an iterator/collection contains the given sequence of values in the given order and without extra values between the sequence values |\n| contains_all_in_order | verify that an iterator/collection contains all the given values and in the given order, possibly with other values between them                 |\n| starts_with           | verify that an iterator/collection contains the given values as the first elements in order                                                      |\n| ends_with             | verify that an iterator/collection contains the given values as the last elements in order                                                       |\n| first_element         | verify that an iterator/collection contains at least one element and return a `Spec` containing the first element                                |\n| last_element          | verify that an iterator/collection contains at least one element and return a `Spec` containing the last element                                 |\n| nth_element           | verify that an iterator/collection contains at least one element and return a `Spec` containing the nth element                                  |\n| elements_at           | pick the elements of an iterator/collection at the given positions and return a `Spec` containing the selected elements                          |\n\n### Maps\n\nFor all types that implement the [`MapProperties`] trait. Currently, it is implemented for\n`std::collections::HashMap`, `std::collections::BTreeMap` and `hashbrown::HashMap`.\n\n| assertion               | description                                                                                                                      |\n|-------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| contains_key            | verify that a map contains a mapping for the expected key                                                                        |\n| contains_keys           | verify that a map contains a mapping for each of the expected keys, ignoring order and duplicates                                |\n| contains_exactly_keys   | verify that a map contains exactly one mapping for each of the expected keys and no other mapping, ignoring order and duplicates |\n| does_not_contain_key    | verify that a map does not contain any mapping for the given key                                                                 |\n| does_not_contain_keys   | verify that a map does not contain any mapping for the given keys                                                                |\n| contains_value          | verify that a map contains at least one mapping where the value is equal to the expected one                                     |\n| contains_values         | verify that a map contains for each expected value at least one mapping where the value is equal, ignoring order and duplicates  |\n| does_not_contain_value  | verify that a map does not contain any mapping where the value is equal to the given one                                         |\n| does_not_contain_values | verify that a map does not contain any mapping where the value is equal to one of the given values                               |\n\n### Panic\n\nfor code inside a closure.\n\nrequires the crate feature `panic` which is enabled by default.\n\n| assertion           | description                                            |\n|---------------------|--------------------------------------------------------|\n| does_not_panic      | verify that some code does not panic                   |                                                \n| panics              | verify that some code panics                           |\n| panics_with_message | verify that some code panics with the expected message |\n\nTo start assertions on code, use the `assert_that_code!()` macro.\n\n\u003c!-- Badges and related URLs --\u003e\n\n[crates-badge]: https://img.shields.io/crates/v/asserting.svg\n\n[crates-url]: https://crates.io/crates/asserting\n\n[docs-badge]: https://docs.rs/asserting/badge.svg\n\n[docs-url]: https://docs.rs/asserting\n\n[msrv-badge]: https://img.shields.io/crates/msrv/asserting?color=chocolate\n\n[code-coverage-badge]: https://codecov.io/github/innoave/asserting/graph/badge.svg?token=o0w7R7J0Op\n\n[code-coverage-url]: https://codecov.io/github/innoave/asserting\n\n\u003c!-- External Links --\u003e\n\n[\"Chaining assertions\"]: https://docs.rs/asserting/latest/asserting/#chaining-assertions-on-the-same-subject\n\n[\"Field-by-field recursive comparison\"]: https://docs.rs/asserting/latest/asserting/#field-by-field-recursive-comparison\n\n[\"soft assertions\"]: https://docs.rs/asserting/#soft-assertions\n\n[custom assertions]: https://docs.rs/asserting/#custom-assertions\n\n[predicate as custom assertion]: https://docs.rs/asserting/#predicate-as-custom-assertion\n\n[property-based assertions]: https://docs.rs/asserting/#property-based-assertions\n\n[`assertions`]: https://docs.rs/asserting/latest/asserting/assertions/\n\n[`DefinedOrderProperty`]: https://docs.rs/asserting/latest/asserting/properties/trait.DefinedOrderProperty.html\n\n[`IsEmptyProperty`]: https://docs.rs/asserting/latest/asserting/properties/trait.IsEmptyProperty.html\n\n[`LengthProperty`]: https://docs.rs/asserting/latest/asserting/properties/trait.LengthProperty.html\n\n[`MapProperties`]: https://docs.rs/asserting/latest/asserting/properties/trait.MapProperties.html\n\n[`NO_COLOR`]: https://no-color.org/\n\n[AssertJ]: https://assertj.github.io/doc/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnoave%2Fasserting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnoave%2Fasserting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnoave%2Fasserting/lists"}