49
49
* @author zcervink@redhat.com
50
50
*/
51
51
public class BasicTest extends AbstractQuarkusTest {
52
- private final String NEW_QUARKUS_MAVEN_PROJECT_NAME = "code-with-quarkus-maven" ;
53
- private final String NEW_QUARKUS_GRADLE_PROJECT_NAME = "code-with-quarkus-gradle" ;
54
- private final String JAVA_VERSION_FOR_QUARKUS_PROJECT = "17" ;
52
+ private static final String NEW_QUARKUS_MAVEN_PROJECT_NAME = "code-with-quarkus-maven" ;
53
+ private static final String NEW_QUARKUS_GRADLE_PROJECT_NAME = "code-with-quarkus-gradle" ;
54
+ private static final String JAVA_VERSION_FOR_QUARKUS_PROJECT = "17" ;
55
55
56
56
@ AfterEach
57
57
public void finishTestRun () {
@@ -62,18 +62,18 @@ public void finishTestRun() {
62
62
}
63
63
64
64
@ Test
65
- public void createBuildQuarkusMavenTest () {
65
+ public void createBuildQuarkusMavenTest () throws IOException {
66
66
createQuarkusProject (remoteRobot , NEW_QUARKUS_MAVEN_PROJECT_NAME , BuildTool .MAVEN , EndpointURLType .DEFAULT );
67
67
ToolWindowPane toolWindowPane = remoteRobot .find (ToolWindowPane .class , Duration .ofSeconds (10 ));
68
68
toolWindowPane .openMavenBuildToolPane ();
69
69
MavenBuildToolPane mavenBuildToolPane = toolWindowPane .find (MavenBuildToolPane .class , Duration .ofSeconds (10 ));
70
- mavenBuildToolPane .buildProject ("verify" );
70
+ mavenBuildToolPane .buildProject ("verify" , "code-with-quarkus" );
71
71
boolean isBuildSuccessful = toolWindowPane .find (BuildView .class , Duration .ofSeconds (10 )).isBuildSuccessful ();
72
72
assertTrue (isBuildSuccessful , "The build should be successful but is not." );
73
73
}
74
74
75
75
@ Test
76
- public void createBuildQuarkusGradleTest () {
76
+ public void createBuildQuarkusGradleTest () throws IOException {
77
77
createQuarkusProject (remoteRobot , NEW_QUARKUS_GRADLE_PROJECT_NAME , BuildTool .GRADLE , EndpointURLType .DEFAULT );
78
78
ToolWindowPane toolWindowPane = remoteRobot .find (ToolWindowPane .class , Duration .ofSeconds (10 ));
79
79
toolWindowPane .openGradleBuildToolPane ();
@@ -85,7 +85,7 @@ public void createBuildQuarkusGradleTest() {
85
85
assertTrue (isBuildSuccessful , "The build should be successful but is not." );
86
86
}
87
87
88
- private void createQuarkusProject (RemoteRobot remoteRobot , String projectName , BuildTool buildTool , EndpointURLType endpointURLType ) {
88
+ private void createQuarkusProject (RemoteRobot remoteRobot , String projectName , BuildTool buildTool , EndpointURLType endpointURLType ) throws IOException {
89
89
remoteRobot .find (FlatWelcomeFrame .class , Duration .ofSeconds (10 )).createNewProject ();
90
90
NewProjectDialogWizard newProjectDialogWizard = remoteRobot .find (NewProjectDialogWizard .class , Duration .ofSeconds (10 ));
91
91
QuarkusNewProjectFirstPage quarkusNewProjectFirstPage = newProjectDialogWizard .find (QuarkusNewProjectFirstPage .class , Duration .ofSeconds (10 ));
@@ -113,11 +113,7 @@ private void createQuarkusProject(RemoteRobot remoteRobot, String projectName, B
113
113
Path quarkusProjectDir = Paths .get (quarkusProjectLocation );
114
114
boolean doesProjectDirExists = Files .exists (quarkusProjectDir );
115
115
if (!doesProjectDirExists ) {
116
- try {
117
- Files .createDirectories (quarkusProjectDir ); // create project directory with project name to prevent "Directory does not exist. It will be created by Intellij. Create/Cancel" popup
118
- } catch (IOException e ) {
119
- throw new RuntimeException (e );
120
- }
116
+ Files .createDirectories (quarkusProjectDir ); // create project directory with project name to prevent "Directory does not exist. It will be created by Intellij. Create/Cancel" popup
121
117
}
122
118
quarkusNewProjectFinalPage .setProjectLocation (quarkusProjectLocation );
123
119
newProjectDialogWizard .finish ();
0 commit comments