jfrunit icon indicating copy to clipboard operation
jfrunit copied to clipboard

Add matching for field/value

Open everflux opened this issue 3 years ago • 2 comments

I emit custom events and would like to check that the events are emitted correctly and in the right order. For comparison I would like to use the value of a custom field. In addition to support that in the ExpectedEvent it would be great if a matcher containsExactly could be provided.

everflux avatar Dec 22 '20 16:12 everflux

Could you share how you envision how using this API looks like? Thanks!

gunnarmorling avatar Dec 23 '20 16:12 gunnarmorling

I think about something like

.filter(...) // only my specific types
.containsExactly(event("A").with("key", "value"), event("B").with("key","value"))

But I don't know if this is a corner case which is not of general interest.

everflux avatar Jan 04 '21 13:01 everflux