Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/quarkus/showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<name>Apache MyFaces Core 5.0 - Extensions - Quarkus - Showcase</name>

<properties>
<failsafe.version>3.2.5</failsafe.version>
<surefire.version>3.2.5</surefire.version>
<failsafe.version>3.6.1</failsafe.version>
<surefire.version>3.6.1</surefire.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.net.URL;

import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
Expand All @@ -49,7 +48,7 @@ public class QuarkusMyFacesShowcaseTest
private static WebClient webClient;

@BeforeAll
public static void initWebClient()
static void initWebClient()
{
webClient = new WebClient(BrowserVersion.CHROME);
webClient.getOptions().setJavaScriptEnabled(true);
Expand All @@ -61,7 +60,7 @@ public static void initWebClient()
}

@AfterAll
public static void closeWebClient()
static void closeWebClient()
{
if (webClient != null)
{
Expand All @@ -71,7 +70,7 @@ public static void closeWebClient()


@Test
public void shouldOpenIndexPage() throws Exception
void shouldOpenIndexPage() throws Exception
{
final HtmlPage page = webClient.getPage(url + "/index.xhtml");
final HtmlDivision datatable = (HtmlDivision) page.getElementById("form:carTable");
Expand All @@ -81,7 +80,7 @@ public void shouldOpenIndexPage() throws Exception
}

@Test
public void shouldObserveEvents() throws Exception
void shouldObserveEvents() throws Exception
{
final HtmlPage page = webClient.getPage(url + "/index.xhtml");
final HtmlInput called = (HtmlInput) page.getElementById("called");
Expand All @@ -92,7 +91,7 @@ public void shouldObserveEvents() throws Exception
}

@Test
public void shouldMapExtensionlessSubFolderView() throws Exception
void shouldMapExtensionlessSubFolderView() throws Exception
{
// MYFACES-4729: AUTOMATIC_EXTENSIONLESS_MAPPING must also register views in sub-folders
final HtmlPage page = webClient.getPage(url + "/test/subFolder/bar");
Expand All @@ -109,7 +108,7 @@ public void shouldMapExtensionlessSubFolderView() throws Exception

@Test
@Disabled("Check HtmlUnit websocket support, for now this test is not working")
public void shouldCallWebSocket() throws IOException
void shouldCallWebSocket() throws Exception
{
HtmlPage page = webClient.getPage(url + "/socket.xhtml");
final HtmlSubmitInput sendMessageBtn = (HtmlSubmitInput) page.getElementById("form:sendMessage");
Expand Down
30 changes: 16 additions & 14 deletions impl/src/test/java/jakarta/faces/FacesExceptionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

package jakarta.faces;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand All @@ -32,66 +34,66 @@ public FacesExceptionTest()
}

@BeforeEach
public void setUp() throws Exception
void setUp() throws Exception
{
}

@AfterEach
public void tearDown() throws Exception
void tearDown() throws Exception
{
}

/*
* Test method for 'jakarta.faces.FacesException.FacesException()'
*/
@Test
public void testFacesException()
void facesException()
{
FacesException e = new FacesException();
Assertions.assertNull(e.getCause());
Assertions.assertNull(e.getMessage());
assertNull(e.getCause());
assertNull(e.getMessage());
}

/*
* Test method for 'jakarta.faces.FacesException.FacesException(Throwable)'
*/
@Test
public void testFacesExceptionThrowable()
void facesExceptionThrowable()
{
Throwable t = new Throwable();
FacesException fe = new FacesException(t);
Assertions.assertEquals(t, fe.getCause());
assertEquals(t, fe.getCause());
}

/*
* Test method for 'jakarta.faces.FacesException.FacesException(String)'
*/
@Test
public void testFacesExceptionString()
void facesExceptionString()
{
String m = "Message";
FacesException e = new FacesException(m);
Assertions.assertEquals(e.getMessage(), m);
assertEquals(e.getMessage(), m);
}

/*
* Test method for 'jakarta.faces.FacesException.FacesException(String, Throwable)'
*/
@Test
public void testFacesExceptionStringThrowable()
void facesExceptionStringThrowable()
{
String m = "Message";
Throwable t = new Throwable();
FacesException fe = new FacesException(m, t);
Assertions.assertEquals(t, fe.getCause());
Assertions.assertEquals(fe.getMessage(), m);
assertEquals(t, fe.getCause());
assertEquals(fe.getMessage(), m);
}

/*
* Test method for 'jakarta.faces.FacesException.getCause()'
*/
@Test
public void testGetCause()
void getCause()
{

}
Expand Down
Loading
Loading