@@ -10,49 +10,55 @@ class CommitQuickServiceTest {
10
10
11
11
@ Test
12
12
void testGenerateQuickCommit_Audit_NoGitCommand () {
13
- String result = commitQuickService .generateQuickCommit ("audit" , false );
14
- assertEquals ("audit: Audit fix" , result );
13
+ String result = commitQuickService .generateQuickCommit ("audit" , null , false );
14
+ assertEquals ("audit: audit fix" , result );
15
15
}
16
16
17
17
@ Test
18
18
void testGenerateQuickCommit_Fix_NoGitCommand () {
19
- String result = commitQuickService .generateQuickCommit ("fix" , false );
20
- assertEquals ("fix: Pull request comments improved" , result );
19
+ String result = commitQuickService .generateQuickCommit ("fix" , null , false );
20
+ assertEquals ("fix: pull request comments improved" , result );
21
21
}
22
22
23
23
@ Test
24
24
void testGenerateQuickCommit_Test_NoGitCommand () {
25
- String result = commitQuickService .generateQuickCommit ("test" , false );
26
- assertEquals ("test: Fixed tests" , result );
25
+ String result = commitQuickService .generateQuickCommit ("test" , null , false );
26
+ assertEquals ("test: fixed tests" , result );
27
27
}
28
28
29
29
@ Test
30
30
void testGenerateQuickCommit_UnknownTopic_NoGitCommand () {
31
- String result = commitQuickService .generateQuickCommit ("unknown" , false );
32
- assertEquals ("Unknown commit type" , result );
31
+ String result = commitQuickService .generateQuickCommit ("unknown" , "" , false );
32
+ assertEquals ("unknown: unknown commit type" , result );
33
33
}
34
34
35
35
@ Test
36
36
void testGenerateQuickCommit_Audit_WithGitCommand () {
37
- String result = commitQuickService .generateQuickCommit ("audit" , true );
38
- assertEquals ("git commit --no-verify -m \" audit: Audit fix\" " , result );
37
+ String result = commitQuickService .generateQuickCommit ("audit" , "" , true );
38
+ assertEquals ("git commit --no-verify -m \" audit: audit fix\" " , result );
39
39
}
40
40
41
41
@ Test
42
42
void testGenerateQuickCommit_Fix_WithGitCommand () {
43
- String result = commitQuickService .generateQuickCommit ("fix" , true );
44
- assertEquals ("git commit --no-verify -m \" fix: Pull request comments improved\" " , result );
43
+ String result = commitQuickService .generateQuickCommit ("fix" , "" , true );
44
+ assertEquals ("git commit --no-verify -m \" fix: pull request comments improved\" " , result );
45
45
}
46
46
47
47
@ Test
48
48
void testGenerateQuickCommit_Test_WithGitCommand () {
49
- String result = commitQuickService .generateQuickCommit ("test" , true );
50
- assertEquals ("git commit --no-verify -m \" test: Fixed tests\" " , result );
49
+ String result = commitQuickService .generateQuickCommit ("test" , "" , true );
50
+ assertEquals ("git commit --no-verify -m \" test: fixed tests\" " , result );
51
51
}
52
52
53
53
@ Test
54
54
void testGenerateQuickCommit_UnknownTopic_WithGitCommand () {
55
- String result = commitQuickService .generateQuickCommit ("unknown" , true );
56
- assertEquals ("git commit --no-verify -m \" Unknown commit type\" " , result );
55
+ String result = commitQuickService .generateQuickCommit ("unknown" , null , true );
56
+ assertEquals ("git commit --no-verify -m \" unknown: unknown commit type\" " , result );
57
+ }
58
+
59
+ @ Test
60
+ void testGenerateQuickCommit_WIP_WithGitCommandAndMessage () {
61
+ String result = commitQuickService .generateQuickCommit ("audit" , "check approach" , true );
62
+ assertEquals ("git commit --no-verify -m \" audit: check approach\" " , result );
57
63
}
58
64
}
0 commit comments