Skip to content

Commit ce6b56d

Browse files
author
joe.walnes
committed
Added type names to quick reference writer.
Build used to write out: [T] instanceOf(Class) Not it writes out: [T] instanceOf(Class type)
1 parent ebfc82d commit ce6b56d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎hamcrest-generator/src/main/java/org/hamcrest/generator/QuickReferenceWriter.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public void writeMethod(String generatedMethodName, FactoryMethod factoryMethod)
4444
seenFirst = true;
4545
}
4646
out.append(removePackageNames(parameter.getType()));
47+
out.append(' ');
48+
out.append(parameter.getName());
4749
}
4850
out.append(')');
4951
out.println();

‎hamcrest-unit-test/src/main/java/org/hamcrest/generator/QuickReferenceWriterTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void testWritesSimplifiedSummaryOfMatchers() throws IOException {
3333
anotherMethod.setGenerifiedType("int");
3434
writer.writeMethod("anotherMethod", anotherMethod);
3535

36-
expected.println(" [String] namedMethod(Cheese, int)");
36+
expected.println(" [String] namedMethod(Cheese a, int b)");
3737
expected.println(" [int] anotherMethod()");
3838
verify();
3939
}
@@ -45,7 +45,7 @@ public void testRemovesPackageNames() throws IOException {
4545
namedMethod.setGenerifiedType("java.lang.Cheese");
4646
writer.writeMethod("namedMethod", namedMethod);
4747

48-
expected.println(" [Cheese] namedMethod(Foo, Cheese<Zoo>)");
48+
expected.println(" [Cheese] namedMethod(Foo a, Cheese<Zoo> b)");
4949
verify();
5050
}
5151

0 commit comments

Comments
 (0)