Skip to content

Commit

Permalink
accepted pull request #119
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanrauh committed Jul 2, 2015
1 parent d3cb4cc commit 0f0be15
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 42 deletions.
20 changes: 20 additions & 0 deletions nbactions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>debug.test.single</actionName>
<packagings>
<packaging>*</packaging>
</packagings>
<goals>
<goal>test-compile</goal>
<goal>surefire:test</goal>
</goals>
<properties>
<test>${packageClassName}</test>
<forkMode>once</forkMode>
<maven.surefire.debug>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</maven.surefire.debug>
<jpda.listen>true</jpda.listen>
<ut.maven.test.skip>false</ut.maven.test.skip>
</properties>
</action>
</actions>
64 changes: 48 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,24 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>

<!-- compiler plugin configuation -->
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.testSource>1.6</maven.compiler.testSource>
<maven.compiler.testTarget>1.6</maven.compiler.testTarget>
<maven.compiler.debug>true</maven.compiler.debug>
<maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel>

<!-- enable / disable Unit Tests -->
<ut.maven.test.skip>false</ut.maven.test.skip>

<!-- enable / disable Integration Tests -->
<it.maven.test.skip>false</it.maven.test.skip>
</properties>



<!-- DEPENDENCY MANAGEMENT SECTION -->
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -85,6 +94,7 @@
</dependencyManagement>


<!-- DEPENDENCIES -->
<dependencies>

<dependency>
Expand All @@ -93,15 +103,14 @@
<version>3.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>



<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -167,13 +176,44 @@
<version>2.1.0.Alpha2</version>
<scope>test</scope>
</dependency>

</dependencies>


<!-- BUILD SECTION -->
<build>
<finalName>${project.artifactId}</finalName>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skip>${ut.maven.test.skip}</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${it.maven.test.skip}</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>


<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -233,6 +273,7 @@
</dependency>
</dependencies>
</profile>

<profile>
<id>Mojarra 2.2.11</id>
<activation>
Expand All @@ -247,6 +288,7 @@
</dependency>
</dependencies>
</profile>

<profile>
<id>MavenCentral</id>
<activation>
Expand Down Expand Up @@ -336,7 +378,7 @@
-->
<project.integration.tests.browser>htmlUnit</project.integration.tests.browser>
<bootsfaces.arquillian.jboss.version>8.2.0.Final</bootsfaces.arquillian.jboss.version>
<ut.maven.test.skip>true</ut.maven.test.skip>
</properties>

<dependencies>
Expand All @@ -345,10 +387,10 @@
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>8.2.0.Final</version>
<scope>test</scope>
<scope>test</scope>
</dependency>

<dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
Expand Down Expand Up @@ -415,15 +457,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- Fork every test because it will launch a separate AS instance -->
<reuseForks>false</reuseForks>
Expand All @@ -436,7 +469,6 @@
</systemPropertyVariables>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
</configuration>

</plugin>
</plugins>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ protected enum PropertyKeys {
PropertyKeys() {
}

@Override
public String toString() {
return ((this.toString != null) ? this.toString : super.toString());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.bootsfaces;
package net.bootsfaces.it;

import java.io.File;
import java.net.URL;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package net.bootsfaces.component;
package net.bootsfaces.it.component;

import java.io.IOException;
import net.bootsfaces.component.InputTextSessionBean;
import net.bootsfaces.component.validators.RequiredInputTextValidator;
import net.bootsfaces.IntegrationTestsBase;
import net.bootsfaces.it.IntegrationTestsBase;
import net.bootsfaces.it.IntegrationTestsBase;
import org.jboss.arquillian.container.test.api.Deployment;
import static org.jboss.arquillian.graphene.Graphene.guardAjax;
import org.jboss.arquillian.graphene.GrapheneElement;
Expand Down Expand Up @@ -163,9 +165,4 @@ public void testImmediate() {
//there is is message input required text for txt 5
assertTrue(!facesMessage.getText().contains(txt_4.getAttribute("id")) && facesMessage.getText().contains(txt_5.getAttribute("id")));
}





}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package net.bootsfaces.component;
package net.bootsfaces.it.component;

import net.bootsfaces.component.validators.RequiredCheckBoxValidator;
import java.io.IOException;
import net.bootsfaces.IntegrationTestsBase;
import net.bootsfaces.component.SelectBooleanCheckBoxSessionBean;
import net.bootsfaces.it.IntegrationTestsBase;
import org.jboss.arquillian.container.test.api.Deployment;
import static org.jboss.arquillian.graphene.Graphene.guardAjax;
import org.jboss.arquillian.graphene.GrapheneElement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package net.bootsfaces.layout;
package net.bootsfaces.it.layout;

import java.io.IOException;
import net.bootsfaces.IntegrationTestsBase;
import net.bootsfaces.it.IntegrationTestsBase;
import net.bootsfaces.it.IntegrationTestsBase;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.graphene.GrapheneElement;
import org.jboss.arquillian.junit.Arquillian;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.bootsfaces.junit.common;
package net.bootsfaces.ut.common;
import javax.faces.context.FacesContext;

import org.mockito.Mockito;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.bootsfaces.junit.common;
package net.bootsfaces.ut.common;

import java.io.IOException;
import java.io.PrintWriter;
Expand Down Expand Up @@ -26,7 +26,7 @@
import org.junit.runners.model.Statement;
import org.mockito.Mockito;

import net.bootsfaces.junit.common.FacesContextMocker;
import net.bootsfaces.ut.common.FacesContextMocker;

public class JsfMock implements TestRule {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.bootsfaces.junit.common;
package net.bootsfaces.ut.common;
import java.io.IOException;
import java.io.Writer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package net.bootsfaces.junit.icon;
package net.bootsfaces.ut.icon;

import java.io.IOException;
import net.bootsfaces.component.IconAwesome;
import net.bootsfaces.junit.common.JsfMock;
import net.bootsfaces.ut.common.JsfMock;
import org.junit.Rule;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package net.bootsfaces.junit.icon;
package net.bootsfaces.ut.icon;

import java.io.IOException;
import net.bootsfaces.component.Icon;
import net.bootsfaces.junit.common.JsfMock;
import net.bootsfaces.ut.common.JsfMock;
import org.junit.Rule;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.bootsfaces.junit.inputText;
package net.bootsfaces.ut.inputText;
import java.io.IOException;
import java.lang.reflect.Field;

Expand All @@ -9,8 +9,8 @@

import net.bootsfaces.component.inputText.InputText;
import net.bootsfaces.component.inputText.InputTextRenderer;
import net.bootsfaces.junit.common.JsfMock;
import net.bootsfaces.junit.common.MyResponseWriter;
import net.bootsfaces.ut.common.JsfMock;
import net.bootsfaces.ut.common.MyResponseWriter;

public class InputTextTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.bootsfaces.junit.selectBooleanCheckbox;
package net.bootsfaces.ut.selectBooleanCheckbox;

import java.io.IOException;
import java.lang.reflect.Field;
Expand All @@ -13,8 +13,8 @@

import net.bootsfaces.component.SelectBooleanCheckbox;
import net.bootsfaces.component.inputText.InputTextRenderer;
import net.bootsfaces.junit.common.JsfMock;
import net.bootsfaces.junit.common.MyResponseWriter;
import net.bootsfaces.ut.common.JsfMock;
import net.bootsfaces.ut.common.MyResponseWriter;

public class SelectBooleanCheckboxTest {

Expand Down

1 comment on commit 0f0be15

@stephanrauh
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've accepted and merge the pull request.

Please sign in to comment.