New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Matching maps with various type #388
Comments
dmfs
added a commit
to saynotobugsorg/confidence
that referenced
this issue
Dec 28, 2023
This provides a Quality similar to `istanceOf` but also taking `Quality`s of subclasses of the given class. This is unsafe because there is no guarantee that the testee is actually of that subtype, but it may be required if the testee is a generic class. It solves issues like described in hamcrest/JavaHamcrest#388
dmfs
added a commit
to saynotobugsorg/confidence
that referenced
this issue
Dec 28, 2023
This provides a Quality similar to `istanceOf` but also taking `Quality`s of subclasses of the given class. This is unsafe because there is no guarantee that the testee is actually of that subtype, but it may be required if the testee is a generic class. It solves issues like described in hamcrest/JavaHamcrest#388
dmfs
added a commit
to saynotobugsorg/confidence
that referenced
this issue
Dec 28, 2023
This provides a Quality similar to `istanceOf` but also taking `Quality`s of subclasses of the given class. This is unsafe because there is no guarantee that the testee is actually of that subtype, but it may be required if the testee is a generic class. It solves issues like described in hamcrest/JavaHamcrest#388
dmfs
added a commit
to saynotobugsorg/confidence
that referenced
this issue
Dec 28, 2023
This provides a Quality similar to `instanceOf` but also taking `Quality`s of subclasses of the given class. This is unsafe because there is no guarantee that the testee is actually of that subtype, but it may be required if the testee is a generic class. It solves issues like described in hamcrest/JavaHamcrest#388
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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))
The text was updated successfully, but these errors were encountered: