I wish/expect to make an assertion with matcher that looks like this:
assertThat(actual, AllOf.allOf(
IsMapContaining.hasEntry("k1", AllOf.allOf(
IsMapContaining.hasEntry("k11", "v11"),
IsMapContaining.hasEntry("k12", "v12"))
),
IsMapContaining.hasEntry("k2", IsIterableContainingInOrder.contains("v21","v22")),
IsMapContaining.hasEntry("k3", "v3")
)
);```
But this fails with
java: no suitable method found for allOf(org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>>>,org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.lang.Iterable<? extends java.lang.String>>>>,org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>)
method org.hamcrest.core.AllOf.allOf(java.lang.Iterable<org.hamcrest.Matcher<? super T>>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>...) is not applicable
(inferred type does not conform to upper bound(s)
inferred: java.util.Map<? extends java.lang.String,? extends java.lang.String>
upper bound(s): java.util.Map<? extends java.lang.String,? extends java.lang.String>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.lang.Iterable<? extends java.lang.String>>>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>>,java.lang.Object)
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(inferred type does not conform to upper bound(s)
inferred: java.util.Map<? extends java.lang.String,? extends java.lang.String>
upper bound(s): java.util.Map<? extends java.lang.String,? extends java.lang.String>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.lang.Iterable<? extends java.lang.String>>>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>>,java.lang.Object)
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
Given an actual map like this:
I wish/expect to make an assertion with matcher that looks like this:
java: no suitable method found for allOf(org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>>>,org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.lang.Iterable<? extends java.lang.String>>>>,org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>) method org.hamcrest.core.AllOf.allOf(java.lang.Iterable<org.hamcrest.Matcher<? super T>>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>...) is not applicable
(inferred type does not conform to upper bound(s)
inferred: java.util.Map<? extends java.lang.String,? extends java.lang.String>
upper bound(s): java.util.Map<? extends java.lang.String,? extends java.lang.String>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.lang.Iterable<? extends java.lang.String>>>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>>,java.lang.Object)
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(inferred type does not conform to upper bound(s)
inferred: java.util.Map<? extends java.lang.String,? extends java.lang.String>
upper bound(s): java.util.Map<? extends java.lang.String,? extends java.lang.String>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.lang.Iterable<? extends java.lang.String>>>,java.util.Map<? extends java.lang.String,? extends org.hamcrest.Matcher<java.util.Map<? extends java.lang.String,? extends java.lang.String>>>,java.lang.Object)
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method org.hamcrest.core.AllOf.allOf(org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>,org.hamcrest.Matcher<? super T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))