[MAGNOLIA-6050] Hamcrest: more exception matchers Created: 26/Jan/15  Updated: 22/May/15  Resolved: 12/May/15

Status: Closed
Project: Magnolia
Component/s: core, testing
Affects Version/s: None
Fix Version/s: 5.4

Type: Improvement Priority: Neutral
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-6063 new Hamcrest Matcher to help build ch... Closed
relation
is related to MAGNOLIA-6092 Hamcrest UtilMatchers: a pattern for ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

We currently have UtilMatchers.isExceptionWithMatchingMessage which takes a regular expression to match the exception's message. (as well ass UtilMatchers.isExceptionWithMessage which simply expects the exact message).
It would be convenient to be able to pass an arbitrary Matcher to match the exception message instead.

By using ChainingMatcher (see MAGNOLIA-6063), we could introduce an ExceptionMatcher



 Comments   
Comment by Magnolia International [ 26/Jan/15 ]

Adapted both existing methods to simply delegate to new one.

Comment by Magnolia International [ 12/May/15 ]

Reopening - moving exception matchers to ExceptionMatcher

Comment by Magnolia International [ 12/May/15 ]

Re-done on feature/exception-matchers-MAGNOLIA-6050 branch. Please review as a whole with MAGNOLIA-6092.

Generated at Mon Feb 12 04:10:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.