Skip to content

Commit d62371d

Browse files
committed
keep verbose (and others for uniformity) as fields
1 parent eaf19ad commit d62371d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/test/java/pl/project13/maven/git/GitCommitIdMojoDirtyFilesTest.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,19 @@ public void testDetectCleanWorkingDirectory() throws Exception {
3838
String prefix = "git";
3939
int abbrevLength = 7;
4040
String dateFormat = "dd.MM.yyyy '@' HH:mm:ss z";
41+
boolean verbose = true;
42+
boolean useNativeGit = false;
43+
String commitIdGenerationMode = "flat";
4144

4245
GitCommitIdMojo mojo = new GitCommitIdMojo();
4346
mojo.setDotGitDirectory(dotGitDirectory);
4447
mojo.setPrefix(prefix);
4548
mojo.setAbbrevLength(abbrevLength);
4649
mojo.setDateFormat(dateFormat);
47-
mojo.setVerbose(true);
48-
mojo.useNativeGit(false);
50+
mojo.setVerbose(verbose);
51+
mojo.useNativeGit(useNativeGit);
4952
mojo.setGitDescribe(gitDescribeConfig);
50-
mojo.setCommitIdGenerationMode("flat");
53+
mojo.setCommitIdGenerationMode(commitIdGenerationMode);
5154

5255

5356
mojo.project = mock(MavenProject.class, RETURNS_MOCKS);
@@ -71,16 +74,19 @@ public void testDetectDirtyWorkingDirectory() throws Exception {
7174
String prefix = "git";
7275
int abbrevLength = 7;
7376
String dateFormat = "dd.MM.yyyy '@' HH:mm:ss z";
77+
boolean verbose = true;
78+
boolean useNativeGit = false;
79+
String commitIdGenerationMode = "flat";
7480

7581
GitCommitIdMojo mojo = new GitCommitIdMojo();
7682
mojo.setDotGitDirectory(dotGitDirectory);
7783
mojo.setPrefix(prefix);
7884
mojo.setAbbrevLength(abbrevLength);
7985
mojo.setDateFormat(dateFormat);
80-
mojo.setVerbose(true);
81-
mojo.useNativeGit(false);
86+
mojo.setVerbose(verbose);
87+
mojo.useNativeGit(useNativeGit);
8288
mojo.setGitDescribe(gitDescribeConfig);
83-
mojo.setCommitIdGenerationMode("flat");
89+
mojo.setCommitIdGenerationMode(commitIdGenerationMode);
8490

8591

8692
mojo.project = mock(MavenProject.class, RETURNS_MOCKS);

0 commit comments

Comments
 (0)