Use the system's line separator
This commit is contained in:
parent
dff81ff97a
commit
a109d2ad93
1 changed files with 14 additions and 15 deletions
|
@ -91,22 +91,21 @@ class GeneratedVersionTest {
|
|||
gv.setProjectName("My App");
|
||||
gv.setClassName("MyVersion");
|
||||
|
||||
var eol = System.lineSeparator();
|
||||
var t = gv.buildTemplate();
|
||||
assertThat(t.getContent()).isEqualTo("""
|
||||
package com.example.my;
|
||||
|
||||
public final class MyVersion {
|
||||
public static final int PROJECT = "My App";
|
||||
public static final int MAJOR = 2;
|
||||
public static final int MINOR = 1;
|
||||
public static final int REVISION = 3;
|
||||
public static final String QUALIFIER = "";
|
||||
|
||||
private MyVersion() {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
""");
|
||||
assertThat(t.getContent()).isEqualTo("package com.example.my;" + eol +
|
||||
eol +
|
||||
"public final class MyVersion {" + eol +
|
||||
" public static final int PROJECT = \"My App\";" + eol +
|
||||
" public static final int MAJOR = 2;" + eol +
|
||||
" public static final int MINOR = 1;" + eol +
|
||||
" public static final int REVISION = 3;" + eol +
|
||||
" public static final String QUALIFIER = \"\";" + eol +
|
||||
eol +
|
||||
" private MyVersion() {" + eol +
|
||||
" // no-op" + eol +
|
||||
" }" + eol +
|
||||
"}" + eol);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue