jonhoo / rust-imap

IMAP client library for Rust
Apache License 2.0
477 stars 80 forks source link

Create a testing module that includes helper methods to build mock responses for testing #262

Closed urkle closed 1 year ago

urkle commented 1 year ago

Allows building response objects for testing applications that use this crate.

Implements a possibility to resolve #261


This change is Reviewable

codecov[bot] commented 1 year ago

Codecov Report

Merging #262 (357d6d9) into main (94418d8) will decrease coverage by 0.1%. The diff coverage is 100.0%.

Additional details and impacted files | [Files Changed](https://app.codecov.io/gh/jonhoo/rust-imap/pull/262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jon+Gjengset) | Coverage Δ | | |---|---|---| | [src/types/quota.rs](https://app.codecov.io/gh/jonhoo/rust-imap/pull/262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jon+Gjengset#diff-c3JjL3R5cGVzL3F1b3RhLnJz) | `87.6% <100.0%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/jonhoo/rust-imap/pull/262/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jon+Gjengset)
urkle commented 1 year ago

@jonhoo all comments addressed. It looks much nicer with the modules. Also the "parse" methods now have more complete example comments to test that things actually compile and run correctly.