Polishing

This commit is contained in:
Sam Brannen
2022-07-13 12:18:29 +02:00
parent 263811ecfa
commit 353666627f
8 changed files with 23 additions and 30 deletions

View File

@@ -43,7 +43,7 @@ class GeneratedMethodTests {
void getSpecReturnsSpec() {
GeneratedMethod method = new GeneratedMethod(NAME);
method.using(builder -> builder.addJavadoc("Test"));
assertThat(method.getSpec().javadoc.toString()).contains("Test");
assertThat(method.getSpec().javadoc).asString().contains("Test");
}
@Test
@@ -57,7 +57,7 @@ class GeneratedMethodTests {
void usingAddsSpec() {
GeneratedMethod method = new GeneratedMethod(NAME);
method.using(builder -> builder.addModifiers(Modifier.PUBLIC));
assertThat(method.getSpec().toString())
assertThat(method.getSpec()).asString()
.isEqualToIgnoringNewLines("public void spring() {}");
}
@@ -66,7 +66,7 @@ class GeneratedMethodTests {
GeneratedMethod method = new GeneratedMethod(NAME);
assertThatIllegalArgumentException()
.isThrownBy(() -> method.using(builder -> builder.setName("badname")))
.withMessage("'spec' must use the generated name \"spring\"");
.withMessage("'spec' must use the generated name 'spring'");
}
}