Skip to content

Commit ff90022

Browse files
committed
Adjust tests for behaviour that works here.
These are tests for things the reflective reader couldn't do. As QDox provides these, change them to positive tests.
1 parent 6f1f817 commit ff90022

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎hamcrest-generator/src/test/java/org/hamcrest/generator/QDoxFactoryReaderTest.java‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ public final class QDoxFactoryReaderTest {
171171
}
172172

173173
@Test public void
174-
cannotReadParameterNamesSoMakesThemUpInstead() throws FileNotFoundException {
174+
canReadParameterNames() throws FileNotFoundException {
175175
FactoryMethod method = readMethod("ParameterizedMatchers", "withParam");
176176
List<FactoryMethod.Parameter> params = method.getParameters();
177177

178-
assertEquals("param1", params.get(0).getName());
179-
assertEquals("param2", params.get(1).getName());
180-
assertEquals("param3", params.get(2).getName());
178+
assertEquals("someString", params.get(0).getName());
179+
assertEquals("numbers", params.get(1).getName());
180+
assertEquals("things", params.get(2).getName());
181181
}
182182

183183
@Test public void
@@ -192,10 +192,9 @@ public final class QDoxFactoryReaderTest {
192192
}
193193

194194
@Test public void
195-
cannotReadJavaDoc() throws FileNotFoundException {
196-
// JavaDoc information is not available through reflection alone.
195+
canReadJavaDoc() throws FileNotFoundException {
197196
FactoryMethod method = readMethod("WithJavaDoc", "documented");
198-
assertEquals(null, method.getJavaDoc());
197+
assertEquals("Look at me!\n\n@return something\n", method.getJavaDoc());
199198
}
200199

201200
@Test public void

0 commit comments

Comments
 (0)