-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCreateGeneratorSteps.java
More file actions
85 lines (62 loc) · 3.18 KB
/
CreateGeneratorSteps.java
File metadata and controls
85 lines (62 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package steps;
import static org.junit.Assert.*;
import org.jbehave.scenario.annotations.Then;
import org.jbehave.scenario.annotations.When;
import org.jbehave.scenario.steps.Steps;
import pageobjects.CustomizeGenerationDialog;
import pageobjects.SelectAGeneratorDialog;
import domain.WorkingProject;
public class CreateGeneratorSteps extends Steps {
@When("I create the generator folder \"$folderPath\"")
public void createFolder(String folderPath) throws Exception {
WorkingProject.createFolder(folderPath);
}
@When("I create the template file \"$filePath\"")
public void createTemplateFile(String filePath) throws Exception {
WorkingProject.createFile(filePath);
}
@When("I create the template file \"$filePath\" with contents: $contents")
public void createTemplateFileWithContents(String filePath, String contents) throws Exception {
WorkingProject.createFileWithContents(filePath, contents);
}
@When("I create the templates configuration file \"$filePath\"")
public void createTemplatesConfigurationFile(String filePath) throws Exception {
WorkingProject.createFile(filePath);
}
@When("I create the templates configuration file \"$filePath\" with contents: $contents")
public void createTemplatesConfigurationFileWithContents(String filePath, String contents) throws Exception {
WorkingProject.createFileWithContents(filePath, contents);
}
@When("I create the params configuration file \"$filePath\" with contents: $contents")
public void createParamsConfigurationFile(String filePath, String contents) throws Exception {
WorkingProject.createFileWithContents(filePath, contents);
}
@When("I create the description file \"$filePath\" with contents: $contents")
public void createDescriptionFile(String filePath, String contents) throws Exception {
WorkingProject.createFileWithContents(filePath, contents);
}
@When("I create the global params configuration file \"$filePath\" with contents: $contents")
public void createGlobalParamsConfigurationFile(String filePath, String contents) throws Exception {
WorkingProject.createFileWithContents(filePath, contents);
}
@Then("I will see the \"$generator\" generator listed on the \"Select a Generator\" dialog")
public void checkGeneratorListed(String generator) {
assertTrue(SelectAGeneratorDialog.isListed(generator));
}
@Then("I will see the template \"$template\" listed with destination \"$destination\" on the \"Customize Generation\" dialog")
public void checkTemplateWithDestinationListed(String template, String destination) {
assertTrue(SelectAGeneratorDialog.isListed(template));
}
@Then("I will see the \"Customize Generation\" dialog")
public void checkCustomizeGenerationDialog() throws Exception{
assertTrue(CustomizeGenerationDialog.isVisible());
}
@Then("I will see the template \"$template\" listed")
public void checkTemplateListed(String template) throws Exception{
assertTrue(CustomizeGenerationDialog.isListed(template));
}
@Then("I will see the template \"$template\" destination set to \"$destination\"")
public void checkTemplateDestination(String template, String destination) throws Exception{
assertEquals(destination, CustomizeGenerationDialog.getDestination(template));
}
}