49495050 */
5151public 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" ;
5555
5656 @ AfterEach
5757 public void finishTestRun () {
@@ -62,18 +62,18 @@ public void finishTestRun() {
6262 }
6363
6464 @ Test
65- public void createBuildQuarkusMavenTest () {
65+ public void createBuildQuarkusMavenTest () throws IOException {
6666 createQuarkusProject (remoteRobot , NEW_QUARKUS_MAVEN_PROJECT_NAME , BuildTool .MAVEN , EndpointURLType .DEFAULT );
6767 ToolWindowPane toolWindowPane = remoteRobot .find (ToolWindowPane .class , Duration .ofSeconds (10 ));
6868 toolWindowPane .openMavenBuildToolPane ();
6969 MavenBuildToolPane mavenBuildToolPane = toolWindowPane .find (MavenBuildToolPane .class , Duration .ofSeconds (10 ));
70- mavenBuildToolPane .buildProject ("verify" );
70+ mavenBuildToolPane .buildProject ("verify" , "code-with-quarkus" );
7171 boolean isBuildSuccessful = toolWindowPane .find (BuildView .class , Duration .ofSeconds (10 )).isBuildSuccessful ();
7272 assertTrue (isBuildSuccessful , "The build should be successful but is not." );
7373 }
7474
7575 @ Test
76- public void createBuildQuarkusGradleTest () {
76+ public void createBuildQuarkusGradleTest () throws IOException {
7777 createQuarkusProject (remoteRobot , NEW_QUARKUS_GRADLE_PROJECT_NAME , BuildTool .GRADLE , EndpointURLType .DEFAULT );
7878 ToolWindowPane toolWindowPane = remoteRobot .find (ToolWindowPane .class , Duration .ofSeconds (10 ));
7979 toolWindowPane .openGradleBuildToolPane ();
@@ -85,7 +85,7 @@ public void createBuildQuarkusGradleTest() {
8585 assertTrue (isBuildSuccessful , "The build should be successful but is not." );
8686 }
8787
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 {
8989 remoteRobot .find (FlatWelcomeFrame .class , Duration .ofSeconds (10 )).createNewProject ();
9090 NewProjectDialogWizard newProjectDialogWizard = remoteRobot .find (NewProjectDialogWizard .class , Duration .ofSeconds (10 ));
9191 QuarkusNewProjectFirstPage quarkusNewProjectFirstPage = newProjectDialogWizard .find (QuarkusNewProjectFirstPage .class , Duration .ofSeconds (10 ));
@@ -113,11 +113,7 @@ private void createQuarkusProject(RemoteRobot remoteRobot, String projectName, B
113113 Path quarkusProjectDir = Paths .get (quarkusProjectLocation );
114114 boolean doesProjectDirExists = Files .exists (quarkusProjectDir );
115115 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
121117 }
122118 quarkusNewProjectFinalPage .setProjectLocation (quarkusProjectLocation );
123119 newProjectDialogWizard .finish ();
0 commit comments