This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust datasource examples and add tests.
Remove gratuitous jaxrs-msc example.
- Loading branch information
1 parent
94b73bc
commit 69212dd
Showing
20 changed files
with
132 additions
and
225 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...asource-deployment/src/it/java/org/wildfly/swarm/examples/ds/deployment/DatasourceIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.wildfly.swarm.examples.ds.deployment; | ||
|
||
import org.jboss.arquillian.drone.api.annotation.Drone; | ||
import org.jboss.arquillian.junit.Arquillian; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.openqa.selenium.WebDriver; | ||
import org.wildfly.swarm.it.AbstractIntegrationTest; | ||
import org.wildfly.swarm.it.Log; | ||
|
||
import static org.fest.assertions.Assertions.assertThat; | ||
|
||
/** | ||
* @author Bob McWhirter | ||
*/ | ||
@RunWith(Arquillian.class) | ||
public class DatasourceIT extends AbstractIntegrationTest { | ||
|
||
@Drone | ||
WebDriver browser; | ||
|
||
@Test | ||
public void testIt() throws Exception { | ||
Log log = getStdOutLog(); | ||
|
||
assertThatLog( log ).hasLineContaining( "WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]" ); | ||
assertThatLog( log ).hasLineContaining( "WFLYSRV0010: Deployed \"h2\" (runtime-name : \"h2\")" ); | ||
|
||
|
||
browser.navigate().to("http://localhost:8080/"); | ||
assertThat(browser.getPageSource()).contains("Howdy using connection: org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7" ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...atasource-subsystem/src/it/java/org/wildfly/swarm/examples/ds/subsystem/DatasourceIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.wildfly.swarm.examples.ds.deployment; | ||
|
||
import org.jboss.arquillian.drone.api.annotation.Drone; | ||
import org.jboss.arquillian.junit.Arquillian; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.openqa.selenium.WebDriver; | ||
import org.wildfly.swarm.it.AbstractIntegrationTest; | ||
import org.wildfly.swarm.it.Log; | ||
|
||
import static org.fest.assertions.Assertions.assertThat; | ||
|
||
/** | ||
* @author Bob McWhirter | ||
*/ | ||
@RunWith(Arquillian.class) | ||
public class DatasourceIT extends AbstractIntegrationTest { | ||
|
||
@Drone | ||
WebDriver browser; | ||
|
||
@Test | ||
public void testIt() throws Exception { | ||
Log log = getStdOutLog(); | ||
|
||
assertThatLog( log ).hasLineContaining( "WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]" ); | ||
|
||
|
||
browser.navigate().to("http://localhost:8080/"); | ||
assertThat(browser.getPageSource()).contains("Howdy using connection: org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7" ); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2015 Red Hat, Inc. and/or its affiliates. | ||
~ | ||
~ Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
--> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.wildfly.swarm.examples</groupId> | ||
<artifactId>wildfly-swarm-examples-parent</artifactId> | ||
<version>1.0.0.Alpha6-SNAPSHOT</version> | ||
<relativePath>../</relativePath> | ||
</parent> | ||
|
||
<artifactId>examples-datasource</artifactId> | ||
|
||
<name>WildFly Swarm Examples: Datasource parent</name> | ||
<description>WildFly Swarm Examples: Datasource parent</description> | ||
|
||
<packaging>pom</packaging> | ||
|
||
|
||
<modules> | ||
<module>datasource-deployment</module> | ||
<module>datasource-subsystem</module> | ||
</modules> | ||
</project> |
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
jaxrs-msc/src/main/java/org/wildfly/swarm/examples/jaxrs/msc/Main.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
jaxrs-msc/src/main/java/org/wildfly/swarm/examples/jaxrs/msc/MyApp.java
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
jaxrs-msc/src/main/java/org/wildfly/swarm/examples/jaxrs/msc/MyResource.java
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
jaxrs-msc/src/main/java/org/wildfly/swarm/examples/jaxrs/msc/MyService.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.