|
11 | 11 | import io.cucumber.java.en.When; |
12 | 12 |
|
13 | 13 | import static org.assertj.core.api.Assertions.assertThat; |
14 | | -import static org.junit.jupiter.api.Assertions.assertTrue; |
15 | 14 |
|
16 | 15 | public class WhenStepDefinitions extends BaseMojoSysTest { |
17 | 16 |
|
18 | | - @When("init goal of the plugin is launched with hooks presented in plugin's configuration") |
| 17 | + @When("initHooks goal of the plugin is launched with hooks presented in plugin's configuration") |
19 | 18 | public void initGoalIsLaunchedWithHooks() throws IOException, InterruptedException { |
20 | 19 | cmdResult = container.execInContainer("mvn", "-f", "pre_commit_push_hooks-pom.xml", |
21 | | - "io.github.pepperkit:git-hooks-maven-plugin:init"); |
| 20 | + "io.github.pepperkit:git-hooks-maven-plugin:initHooks"); |
22 | 21 | } |
23 | 22 |
|
24 | | - @When("init goal of the plugin is launched with hooks deleted from plugin's configuration") |
25 | | - @When("init goal of the plugin is launched with another plugin's configuration") |
| 23 | + @When("initHooks goal of the plugin is launched with hooks deleted from plugin's configuration") |
| 24 | + @When("initHooks goal of the plugin is launched with another plugin's configuration") |
26 | 25 | public void hooksDeletedFromPom() throws IOException, InterruptedException { |
27 | 26 | cmdResult = container.execInContainer("mvn", "-f", "no_hooks-pom.xml", |
28 | | - "io.github.pepperkit:git-hooks-maven-plugin:init"); |
| 27 | + "io.github.pepperkit:git-hooks-maven-plugin:initHooks"); |
29 | 28 | assertThat(cmdResult.getStdout()) |
30 | 29 | .contains("BUILD SUCCESS"); |
31 | 30 | } |
32 | 31 |
|
33 | | - @When("validate goal of plugin is launched without specifying a particular hook") |
| 32 | + @When("printHooks goal of plugin is launched without specifying a particular hook") |
34 | 33 | public void validateGoalLaunchedWithoutSpecificHooks() throws IOException, InterruptedException { |
35 | 34 | cmdResult = container.execInContainer("mvn", "-f", "pre_commit_push_hooks-pom.xml", |
36 | | - "io.github.pepperkit:git-hooks-maven-plugin:validate"); |
| 35 | + "io.github.pepperkit:git-hooks-maven-plugin:printHooks"); |
37 | 36 | } |
38 | 37 |
|
39 | | - @When("validate goal of plugin is launched with the specific hook name provided") |
| 38 | + @When("printHooks goal of plugin is launched with the specific hook name provided") |
40 | 39 | public void validateGoalLaunchedWithPreCommitHookSpecified() throws IOException, InterruptedException { |
41 | 40 | cmdResult = container.execInContainer("mvn", "-f", "pre_commit_push_hooks-pom.xml", |
42 | | - "-DhookName=pre-commit", "io.github.pepperkit:git-hooks-maven-plugin:validate"); |
| 41 | + "-DhookName=pre-commit", "io.github.pepperkit:git-hooks-maven-plugin:printHooks"); |
43 | 42 | } |
44 | 43 |
|
45 | | - @When("test goal of plugin is launched without specifying a particular hook") |
| 44 | + @When("executeHooks goal of plugin is launched without specifying a particular hook") |
46 | 45 | public void testGoalLaunchedWithoutSpecificHooks() throws IOException, InterruptedException { |
47 | 46 | cmdResult = container.execInContainer("mvn", "-f", "pre_commit_push_hooks-pom.xml", |
48 | | - "io.github.pepperkit:git-hooks-maven-plugin:test"); |
| 47 | + "io.github.pepperkit:git-hooks-maven-plugin:executeHooks"); |
49 | 48 | } |
50 | 49 |
|
51 | | - @When("test goal of plugin is launched with the specific hook name provided") |
| 50 | + @When("executeHooks goal of plugin is launched with the specific hook name provided") |
52 | 51 | public void testGoalLaunchedWithPrePushHookSpecified() throws IOException, InterruptedException { |
53 | 52 | cmdResult = container.execInContainer("mvn", "-f", "pre_commit_push_hooks-pom.xml", |
54 | | - "-DhookName=pre-push", "io.github.pepperkit:git-hooks-maven-plugin:test"); |
| 53 | + "-DhookName=pre-push", "io.github.pepperkit:git-hooks-maven-plugin:executeHooks"); |
55 | 54 | } |
56 | 55 | } |
0 commit comments