-
Notifications
You must be signed in to change notification settings - Fork 1k
Convert matcher tests to java #14911
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
base: main
Are you sure you want to change the base?
Conversation
assertThatCode(() -> extendsClass(named(Object.class.getName())).matches(type)) | ||
.doesNotThrowAnyException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it really threw an exception then the test would already failed the first time when you called it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was noExceptionThrown()
before - but I can just make it a comment
|
||
@ParameterizedTest | ||
@CsvSource({ | ||
"io.opentelemetry.javaagent.tooling.bytebuddy.matcher.testclasses.A, io.opentelemetry.javaagent.tooling.bytebuddy.matcher.testclasses.B, false", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could consider dropping the package name from here and adding it inside the test method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes it just harder to find usages in the IDE
|
||
import java.util.Iterator; | ||
|
||
public class ThrowOnFirstElement implements Iterator<Object> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be package private
Part of #14803