Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ public boolean equals(@Nullable Object o) {
public int hashCode() {
return descriptor.hashCode();
}

@Override
public String toString() {
return this.getClass().getSimpleName() + "{" + "descriptor=" + getDescriptor() + '}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ void getValues() {
assertThat(testInstrument.getDescriptor()).isSameAs(INSTRUMENT_DESCRIPTOR);
}

@Test
void testToString() {
TestInstrument testInstrument = new TestInstrument(INSTRUMENT_DESCRIPTOR);
assertThat(testInstrument)
.hasToString("TestInstrument{descriptor=" + INSTRUMENT_DESCRIPTOR + "}");
}

private static final class TestInstrument extends AbstractInstrument {
TestInstrument(InstrumentDescriptor descriptor) {
super(descriptor);
Expand Down