You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2018/05/03 18:26:13 UTC

[myfaces-test] branch 1_0_0_beta_2 created (now a9f13ae)

This is an automated email from the ASF dual-hosted git repository.

deki pushed a change to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git.


      at a9f13ae  move temporally for prepare release procedure

This branch includes the following new commits:

     new 1767909  folder for the test framework
     new 2c106d1  copy shale test to myfaces
     new 11eb777  moved one level up...
     new e020e3a  
     new 706afbb  create test12 module
     new 1688cfc  Create test20 module
     new 79b6982  move to test12 module
     new 7d34029  remove moved src
     new f08b599  copy pom.xml
     new 8c00c4b  Create initial layout for myfaces test
     new 49e6d15  Create test20 branch
     new 5971ef1  MYFACES-2327 Move facelets test code to myfaces
     new 5bf67ba  small fixes (add _processingEvents and redirect getMimeType)
     new fc865e1  MYFACES-2345 Add View Parameters feature
     new c85bfc4  small fix on MockApplication20
     new 5ad5cb6  use getDigester instead local var
     new 021af1e  add Application.getProjectStage()
     new 7971bcf  set jdk to 1.5
     new 774b61a  MYFACES-2422 Change package name to org.apache.myfaces.test in myfaces-test project
     new f5081c8  MYFACES-2492 Update and create Mock classes in myfaces-test20 (Thanks to Ingo Hofmann for this patch)
     new c063fa6  update dependency versions
     new 6e25395  [maven-release-plugin] prepare release 1_0_0_beta
     new 5b15eed  [maven-release-plugin] prepare for next development iteration
     new 14e2610  MYFACESTEST-3 Add configuration resource for Myfaces 1.2 to ConfigParser (Thanks to Rudy De Busscher for this patch)
     new 706198f  MYFACESTEST-5 Implementation of MockHttpSession.invalidate() (Thanks to Christoph Göldner for this patch) + test case
     new 869f785  MYFACESTEST-4 Unable to call setValue of ValueExpression in test (Thanks to Christoph Göldner for the patch)
     new 8dd12fe  [maven-release-plugin]  copy for tag 1_0_0_beta_2
     new a9f13ae  move temporally for prepare release procedure

The 28 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 01/08: update dependency versions

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit c063fa60d799a1597cb9a2b66ee6c5d83304974f
Author: Leonardo Uribe <lu...@apache.org>
AuthorDate: Mon Feb 15 18:32:12 2010 +0000

    update dependency versions
---
 pom.xml        | 2 +-
 test20/pom.xml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 63d2c16..41b2608 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.myfaces</groupId>
         <artifactId>myfaces</artifactId>
-        <version>6</version>
+        <version>7</version>
     </parent>
     <groupId>org.apache.myfaces.test</groupId>
     <artifactId>myfaces-test-project</artifactId>
diff --git a/test20/pom.xml b/test20/pom.xml
index 80b4211..2f0fdbf 100644
--- a/test20/pom.xml
+++ b/test20/pom.xml
@@ -197,7 +197,7 @@
         </plugins>    
     </build>
     <properties>
-        <jsf-ri.version>2.0.0-SNAPSHOT</jsf-ri.version>
-        <jsf-myfaces.version>2.0.0-SNAPSHOT</jsf-myfaces.version>
+        <jsf-ri.version>2.0.2-b10</jsf-ri.version>
+        <jsf-myfaces.version>2.0.0-beta</jsf-myfaces.version>
     </properties>
 </project>

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 08/08: move temporally for prepare release procedure

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit a9f13ae83c60a3948ef202cc7635e41098e6a215
Author: Leonardo Uribe <lu...@apache.org>
AuthorDate: Mon Mar 22 16:47:16 2010 +0000

    move temporally for prepare release procedure

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 04/08: MYFACESTEST-3 Add configuration resource for Myfaces 1.2 to ConfigParser (Thanks to Rudy De Busscher for this patch)

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit 14e2610e4e6bb6eadd8d4d24eabb9207fcdb90db
Author: Jakob Korherr <ja...@apache.org>
AuthorDate: Tue Mar 9 13:28:49 2010 +0000

    MYFACESTEST-3 Add configuration resource for Myfaces 1.2 to ConfigParser (Thanks to Rudy De Busscher for this patch)
---
 .../java/org/apache/myfaces/test/config/ConfigParser.java     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java b/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java
index 7bda502..d539e96 100644
--- a/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java
+++ b/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java
@@ -85,6 +85,12 @@ public class ConfigParser {
     { "/org/apache/myfaces/resource/standard-faces-config.xml",
     };
 
+    /**
+     * <p>Configuration resource URLs for Apache MyFaces 1.2.</p>
+     */
+    private static final String[] MYFACES_RESOURCES12 =
+    { "/META-INF/standard-faces-config.xml",
+    };    
 
     // ------------------------------------------------------ Instance Variables
 
@@ -113,7 +119,10 @@ public class ConfigParser {
 
         URL[] urls = translate(JSFRI_RESOURCES);
         if (urls[0] == null) {
-            urls = translate(MYFACES_RESOURCES);
+            urls = translate(MYFACES_RESOURCES12);
+            if (urls[0] == null) {
+                urls = translate(MYFACES_RESOURCES);
+            }
         }
         return urls;
 

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 02/08: [maven-release-plugin] prepare release 1_0_0_beta

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit 6e2539580612ecbbb4632a542ead15647ad8442f
Author: Leonardo Uribe <lu...@apache.org>
AuthorDate: Mon Feb 15 18:39:53 2010 +0000

    [maven-release-plugin] prepare release 1_0_0_beta
---
 pom.xml        | 11 +++++------
 test12/pom.xml |  5 ++---
 test20/pom.xml |  5 ++---
 3 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/pom.xml b/pom.xml
index 41b2608..8634d6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,8 +18,7 @@
  * $Id$
  */
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -31,16 +30,16 @@
     <artifactId>myfaces-test-project</artifactId>
     <packaging>pom</packaging>
     <name>Myfaces Test Framework</name>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.0.0-beta</version>
     <url>http://myfaces.apache.org/test</url>
     <issueManagement>
       <system>jira</system>
       <url>http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10600</url>
     </issueManagement>
     <scm>
-      <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/test/trunk</connection>
-      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/test/trunk</developerConnection>
-      <url>http://svn.apache.org/repos/asf/myfaces/test/trunk</url>
+      <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta</connection>
+      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta</developerConnection>
+      <url>http://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta</url>
     </scm>
     <modules>
       <module>test12</module>
diff --git a/test12/pom.xml b/test12/pom.xml
index 5fed3ad..871ba4d 100644
--- a/test12/pom.xml
+++ b/test12/pom.xml
@@ -18,14 +18,13 @@
  * $Id$
  */
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>org.apache.myfaces.test</groupId>
         <artifactId>myfaces-test-project</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.0.0-beta</version>
     </parent>
 
     <artifactId>myfaces-test12</artifactId>
diff --git a/test20/pom.xml b/test20/pom.xml
index 2f0fdbf..170e5c7 100644
--- a/test20/pom.xml
+++ b/test20/pom.xml
@@ -18,14 +18,13 @@
  * $Id$
  */
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>org.apache.myfaces.test</groupId>
         <artifactId>myfaces-test-project</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.0.0-beta</version>
     </parent>
 
     <artifactId>myfaces-test20</artifactId>

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 06/08: MYFACESTEST-4 Unable to call setValue of ValueExpression in test (Thanks to Christoph Göldner for the patch)

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit 869f785c550cdf31903eaa4c6dbdf8151a89cac0
Author: Jakob Korherr <ja...@apache.org>
AuthorDate: Mon Mar 15 17:46:23 2010 +0000

    MYFACESTEST-4 Unable to call setValue of ValueExpression in test (Thanks to Christoph Göldner for the patch)
---
 .../myfaces/test/mock/MockApplication12.java       | 11 +++-
 .../myfaces/test/el/MockValueExpressionTest.java   | 63 ++++++++++++++++++++++
 2 files changed, 72 insertions(+), 2 deletions(-)

diff --git a/test12/src/main/java/org/apache/myfaces/test/mock/MockApplication12.java b/test12/src/main/java/org/apache/myfaces/test/mock/MockApplication12.java
index 28e4ba5..cdcabfc 100644
--- a/test12/src/main/java/org/apache/myfaces/test/mock/MockApplication12.java
+++ b/test12/src/main/java/org/apache/myfaces/test/mock/MockApplication12.java
@@ -23,6 +23,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 import javax.el.ArrayELResolver;
 import javax.el.BeanELResolver;
@@ -259,8 +260,14 @@ public class MockApplication12 extends MockApplication {
         if (locale == null) {
             locale = Locale.getDefault();
         }
-        return ResourceBundle.getBundle(name, locale);
-
+        try 
+        {
+            return ResourceBundle.getBundle(name, locale);
+        }
+        catch (MissingResourceException e) 
+        {
+            return null;
+        }
     }
 
 
diff --git a/test12/src/test/java/org/apache/myfaces/test/el/MockValueExpressionTest.java b/test12/src/test/java/org/apache/myfaces/test/el/MockValueExpressionTest.java
new file mode 100644
index 0000000..d8caeec
--- /dev/null
+++ b/test12/src/test/java/org/apache/myfaces/test/el/MockValueExpressionTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.test.el;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+
+import org.apache.myfaces.test.base.AbstractJsfTestCase;
+
+/**
+ * Test class for ValueExpressions
+ * 
+ * @author Jakob Korherr (latest modification by $Author$)
+ * @author Christoph G�ldner
+ * @version $Revision$ $Date$
+ */
+public class MockValueExpressionTest extends AbstractJsfTestCase
+{
+    
+    public MockValueExpressionTest(String name) 
+    {
+        super(name);
+    }
+
+    public void testSetValue() 
+    {
+        // set value of #{foo} to BAR via ValueExpression
+        ELContext elContext = facesContext.getELContext();
+        ValueExpression ve = application.getExpressionFactory()
+                .createValueExpression(elContext, "#{foo}", String.class);
+        ve.setValue(elContext, "BAR");
+        assertEquals("BAR", externalContext.getRequestMap().get("foo"));
+    }
+
+    public void testGetValue() 
+    {
+        // set value of #{foo} to BAR in request scope
+        externalContext.getRequestMap().put("foo", "BAR");
+        // resolve value of #{foo} via ValueExpression
+        ELContext elContext = facesContext.getELContext();
+        ValueExpression ve = application.getExpressionFactory()
+                .createValueExpression(elContext, "#{foo}", String.class);
+        Object value = ve.getValue(elContext);
+        assertEquals("BAR", value);
+    }
+    
+}

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 07/08: [maven-release-plugin] copy for tag 1_0_0_beta_2

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit 8dd12fe61cae8e0e7b8dad49cb8ca6dc25bf1bbf
Author: Leonardo Uribe <lu...@apache.org>
AuthorDate: Mon Mar 22 16:43:35 2010 +0000

    [maven-release-plugin]  copy for tag 1_0_0_beta_2
---
 pom.xml        | 8 ++++----
 test12/pom.xml | 2 +-
 test20/pom.xml | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index af3cfaf..d0c4484 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,16 +30,16 @@
     <artifactId>myfaces-test-project</artifactId>
     <packaging>pom</packaging>
     <name>Myfaces Test Framework</name>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.0.0-beta-2</version>
     <url>http://myfaces.apache.org/test</url>
     <issueManagement>
       <system>jira</system>
       <url>http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10600</url>
     </issueManagement>
     <scm>
-      <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/test/trunk</connection>
-      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/test/trunk</developerConnection>
-      <url>http://svn.apache.org/repos/asf/myfaces/test/trunk</url>
+      <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta_2</connection>
+      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta_2</developerConnection>
+      <url>http://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta_2</url>
     </scm>
     <modules>
       <module>test12</module>
diff --git a/test12/pom.xml b/test12/pom.xml
index 3ffa3bb..62d048b 100644
--- a/test12/pom.xml
+++ b/test12/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.myfaces.test</groupId>
         <artifactId>myfaces-test-project</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.0.0-beta-2</version>
     </parent>
 
     <artifactId>myfaces-test12</artifactId>
diff --git a/test20/pom.xml b/test20/pom.xml
index 8021996..c7b9702 100644
--- a/test20/pom.xml
+++ b/test20/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.myfaces.test</groupId>
         <artifactId>myfaces-test-project</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>1.0.0-beta-2</version>
     </parent>
 
     <artifactId>myfaces-test20</artifactId>

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 05/08: MYFACESTEST-5 Implementation of MockHttpSession.invalidate() (Thanks to Christoph Göldner for this patch) + test case

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit 706198feaf34edaf0619c4896d1f74c0d02b6521
Author: Jakob Korherr <ja...@apache.org>
AuthorDate: Mon Mar 15 17:17:03 2010 +0000

    MYFACESTEST-5 Implementation of MockHttpSession.invalidate() (Thanks to Christoph Göldner for this patch) + test case
---
 .../apache/myfaces/test/mock/MockHttpSession.java  |  26 ++++-
 .../myfaces/test/mock/MockHttpSessionTest.java     | 124 +++++++++++++++++++++
 2 files changed, 148 insertions(+), 2 deletions(-)

diff --git a/test12/src/main/java/org/apache/myfaces/test/mock/MockHttpSession.java b/test12/src/main/java/org/apache/myfaces/test/mock/MockHttpSession.java
index 80fb5cb..62686de 100644
--- a/test12/src/main/java/org/apache/myfaces/test/mock/MockHttpSession.java
+++ b/test12/src/main/java/org/apache/myfaces/test/mock/MockHttpSession.java
@@ -98,6 +98,7 @@ public class MockHttpSession implements HttpSession {
     private HashMap attributes = new HashMap();
     private String id = "123";
     private ServletContext servletContext = null;
+    private boolean invalid = false;
 
 
     // ---------------------------------------------------------- Public Methods
@@ -119,6 +120,8 @@ public class MockHttpSession implements HttpSession {
     /** {@inheritDoc} */
     public Object getAttribute(String name) {
 
+        assertValidity();
+
         return attributes.get(name);
 
     }
@@ -127,6 +130,8 @@ public class MockHttpSession implements HttpSession {
     /** {@inheritDoc} */
     public Enumeration getAttributeNames() {
 
+        assertValidity();
+
         return new MockEnumeration(attributes.keySet().iterator());
 
     }
@@ -198,9 +203,11 @@ public class MockHttpSession implements HttpSession {
 
     /** {@inheritDoc} */
     public void invalidate() {
+        
+        assertValidity();
 
-        throw new UnsupportedOperationException();
-
+        attributes.clear();
+        invalid = true;
     }
 
 
@@ -223,6 +230,8 @@ public class MockHttpSession implements HttpSession {
     /** {@inheritDoc} */
     public void removeAttribute(String name) {
 
+        assertValidity();
+
         if (attributes.containsKey(name)) {
             Object value = attributes.remove(name);
             fireAttributeRemoved(name, value);
@@ -242,6 +251,8 @@ public class MockHttpSession implements HttpSession {
     /** {@inheritDoc} */
     public void setAttribute(String name, Object value) {
 
+        assertValidity();
+
         if (name == null) {
             throw new IllegalArgumentException("Attribute name cannot be null");
         }
@@ -335,4 +346,15 @@ public class MockHttpSession implements HttpSession {
     }
 
 
+    /**
+     * <p>Throws an {@link IllegalStateException} if this session is invalid.</p>
+     */
+    private void assertValidity() 
+    {
+        if (invalid) 
+        {
+            throw new IllegalStateException("Session is invalid.");
+        }
+    }
+
 }
diff --git a/test12/src/test/java/org/apache/myfaces/test/mock/MockHttpSessionTest.java b/test12/src/test/java/org/apache/myfaces/test/mock/MockHttpSessionTest.java
new file mode 100644
index 0000000..014f100
--- /dev/null
+++ b/test12/src/test/java/org/apache/myfaces/test/mock/MockHttpSessionTest.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.test.mock;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.myfaces.test.base.AbstractJsfTestCase;
+
+/**
+ * Test class for MockHttpSession.
+ * 
+ * @author Jakob Korherr (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class MockHttpSessionTest extends AbstractJsfTestCase
+{
+
+    public static Test suite() 
+    {
+        return (new TestSuite(MockHttpSessionTest.class));
+    }
+    
+    private MockHttpSession session;
+    
+    public MockHttpSessionTest(String name)
+    {
+        super(name);
+    }
+    
+    protected void setUp() throws Exception 
+    {
+        super.setUp();
+        
+        session = new MockHttpSession();
+    }
+
+    protected void tearDown() throws Exception 
+    {
+        super.tearDown();
+        
+        session = null;
+    }
+    
+    /**
+     * Tests if the session is correctly invalidated.
+     */
+    public void testSessionInvalidate()
+    {
+        // first store a value in the session and retrieve it again
+        session.setAttribute("someAttribute", "someValue");
+        assertEquals("someValue", session.getAttribute("someAttribute"));
+        
+        // invalidate the session
+        session.invalidate();
+        
+        try
+        {
+            session.getAttribute("someAttribute");
+            fail("Session was already invalidated, getAttribute() has to throw an IllegalStateException.");
+        }
+        catch(IllegalStateException e)
+        {
+            // expected Exception
+        }
+        
+        try
+        {
+            session.setAttribute("someAttribute", "anotherValue");
+            fail("Session was already invalidated, setAttribute() has to throw an IllegalStateException.");
+        }
+        catch(IllegalStateException e)
+        {
+            // expected Exception
+        }
+        
+        try
+        {
+            session.removeAttribute("someAttribute");
+            fail("Session was already invalidated, removeAttribute() has to throw an IllegalStateException.");
+        }
+        catch(IllegalStateException e)
+        {
+            // expected Exception
+        }
+        
+        try
+        {
+            session.invalidate();
+            fail("Session was already invalidated, invalidate() has to throw an IllegalStateException.");
+        }
+        catch(IllegalStateException e)
+        {
+            // expected Exception
+        }
+        
+        try
+        {
+            session.getAttributeNames();
+            fail("Session was already invalidated, getAttributeNames() has to throw an IllegalStateException.");
+        }
+        catch(IllegalStateException e)
+        {
+            // expected Exception
+        }
+    }
+    
+}

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

[myfaces-test] 03/08: [maven-release-plugin] prepare for next development iteration

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_beta_2
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit 5b15eed8a194eb9a5c54929b119ea589118feb21
Author: Leonardo Uribe <lu...@apache.org>
AuthorDate: Mon Feb 15 18:40:28 2010 +0000

    [maven-release-plugin] prepare for next development iteration
---
 pom.xml        | 8 ++++----
 test12/pom.xml | 2 +-
 test20/pom.xml | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8634d6e..af3cfaf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,16 +30,16 @@
     <artifactId>myfaces-test-project</artifactId>
     <packaging>pom</packaging>
     <name>Myfaces Test Framework</name>
-    <version>1.0.0-beta</version>
+    <version>1.0.0-SNAPSHOT</version>
     <url>http://myfaces.apache.org/test</url>
     <issueManagement>
       <system>jira</system>
       <url>http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10600</url>
     </issueManagement>
     <scm>
-      <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta</connection>
-      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta</developerConnection>
-      <url>http://svn.apache.org/repos/asf/myfaces/test/tags/1_0_0_beta</url>
+      <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/test/trunk</connection>
+      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/test/trunk</developerConnection>
+      <url>http://svn.apache.org/repos/asf/myfaces/test/trunk</url>
     </scm>
     <modules>
       <module>test12</module>
diff --git a/test12/pom.xml b/test12/pom.xml
index 871ba4d..3ffa3bb 100644
--- a/test12/pom.xml
+++ b/test12/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.myfaces.test</groupId>
         <artifactId>myfaces-test-project</artifactId>
-        <version>1.0.0-beta</version>
+        <version>1.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>myfaces-test12</artifactId>
diff --git a/test20/pom.xml b/test20/pom.xml
index 170e5c7..8021996 100644
--- a/test20/pom.xml
+++ b/test20/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.myfaces.test</groupId>
         <artifactId>myfaces-test-project</artifactId>
-        <version>1.0.0-beta</version>
+        <version>1.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>myfaces-test20</artifactId>

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.