Skip to content
Browse files

Merge pull request #3 from ssilvert/fix-tests

JSFUNIT-287 Fix tests
  • Loading branch information...
2 parents b3c6832 + af1e052 commit 3af4775352c444eb9048c7db39c3bc3be943cb8f @joserodolfofreitas joserodolfofreitas committed Sep 8, 2011
View
1 jboss-jsfunit-core/src/main/java/org/jboss/jsfunit/framework/FaceletsErrorPageException.java
@@ -52,6 +52,7 @@
*/
public static boolean isFaceletsErrorPage(WebResponse response)
{
+ if (response == null) return false;
String responseBody = response.getContentAsString();
if (responseBody == null) return false;
View
5 jboss-jsfunit-core/src/main/java/org/jboss/jsfunit/jsfsession/JSFServerSession.java
@@ -132,10 +132,11 @@ public Object getComponentValue(String componentID)
public Object getManagedBeanValue(String elExpression)
{
FacesContext facesContext = getFacesContext();
+ ExternalContext extContext = facesContext.getExternalContext();
try
{
- setELRunning(true, facesContext.getExternalContext());
+ setELRunning(true, extContext);
return facesContext.getApplication()
.createValueBinding(elExpression)
.getValue(facesContext);
@@ -157,7 +158,7 @@ public Object getManagedBeanValue(String elExpression)
}
finally
{
- setELRunning(false, facesContext.getExternalContext());
+ setELRunning(false, extContext);
}
}
View
12 jboss-jsfunit-examples/jboss-jsfunit-examples-ajax4jsf/pom.xml
@@ -231,6 +231,17 @@
</build>
</profile>
+ <profile>
+ <id>mojarra1.2</id>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>compile</scope>
+ <version>1.2_13</version>
+ </dependency>
+ </dependencies>
+ </profile>
</profiles>
@@ -275,6 +286,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>
View
9 ...-examples/jboss-jsfunit-examples-hellojsf/jboss-jsfunit-examples-hellojsf-jsfunit/pom.xml
@@ -88,6 +88,14 @@
<jsfMajorVersion>1</jsfMajorVersion>
<jsfMinorVersion>2</jsfMinorVersion>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>compile</scope>
+ <version>1.2_13</version>
+ </dependency>
+ </dependencies>
</profile>
<profile>
@@ -190,6 +198,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>
View
17 ...amples/jboss-jsfunit-examples-hellojsf/jboss-jsfunit-examples-hellojsf-pathmapped/pom.xml
@@ -107,6 +107,22 @@
</build>
</profile>
+ <profile>
+ <id>mojarra1.2</id>
+ <properties>
+ <jsfMajorVersion>1</jsfMajorVersion>
+ <jsfMinorVersion>2</jsfMinorVersion>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>compile</scope>
+ <version>1.2_13</version>
+ </dependency>
+ </dependencies>
+ </profile>
+
</profiles>
<dependencies>
@@ -129,6 +145,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>
View
1 ...t-examples/jboss-jsfunit-examples-hellojsf/jboss-jsfunit-examples-hellojsf-webapp/pom.xml
@@ -28,6 +28,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
</dependency>
</dependencies>
View
4 jboss-jsfunit-examples/jboss-jsfunit-examples-hellojsf/pom.xml
@@ -37,12 +37,12 @@
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
- <!--
+
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<scope>provided</scope>
- </dependency> -->
+ </dependency>
</dependencies>
</project>

0 comments on commit 3af4775

Please sign in to comment.
Something went wrong with that request. Please try again.