Author: alexsmirnov
Date: 2007-10-15 20:21:38 -0400 (Mon, 15 Oct 2007)
New Revision: 3387
Added:
trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
trunk/framework/impl/src/test/java/org/ajax4jsf/util/LRUMapTest.java
trunk/framework/test/src/test/java/org/ajax4jsf/application/AjaxStateHolderTest.java
trunk/framework/test/src/test/java/org/ajax4jsf/context/
trunk/framework/test/src/test/java/org/ajax4jsf/context/InitParametersTest.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateHolder.java
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
trunk/framework/impl/src/main/java/org/ajax4jsf/util/LRUMap.java
Log:
Create unit tests for AjaxStateManager classes.
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateHolder.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateHolder.java 2007-10-15
22:11:20 UTC (rev 3386)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateHolder.java 2007-10-16
00:21:38 UTC (rev 3387)
@@ -9,7 +9,10 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.context.ContextInitParameters;
import org.ajax4jsf.util.LRUMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* @author asmirnov
@@ -17,6 +20,7 @@
*/
public class AjaxStateHolder implements Serializable {
+ private static final Log _log = LogFactory.getLog(AjaxStateHolder.class);
/**
*
*/
@@ -25,50 +29,97 @@
private final LRUMap views;
- private AjaxStateHolder(int capacity) {
+ private final int numberOfViews;
+
+ private AjaxStateHolder(int capacity, int numberOfViews) {
views = new LRUMap(capacity);
+ this.numberOfViews = numberOfViews;
}
public static AjaxStateHolder getInstance(FacesContext context) {
+ if (null == context) {
+ throw new NullPointerException(
+ "FacesContext parameter for get view states object is null");
+ }
ExternalContext externalContext = context.getExternalContext();
Object session = externalContext.getSession(true);
Map sessionMap = externalContext.getSessionMap();
+ if (_log.isDebugEnabled()) {
+ _log.debug("Request for a view states holder instance");
+ }
AjaxStateHolder instance = null;
synchronized (session) {
instance = (AjaxStateHolder) sessionMap.get(STATE_HOLDER);
if (null == instance) {
// Create and store in session new state holder.
- // TODO - make size parameter configurable
- instance = new AjaxStateHolder(
- AjaxStateManager.DEFAULT_NUMBER_OF_VIEWS);
+ int numbersOfViewsInSession = ContextInitParameters
+ .getNumbersOfViewsInSession(context);
+ int numbersOfLogicalViews = ContextInitParameters
+ .getNumbersOfLogicalViews(context);
+ if (_log.isDebugEnabled()) {
+ _log
+ .debug("No AjaxStateHolder instance in session, create new for hold "
+ + numbersOfViewsInSession
+ + " viewId and "
+ + numbersOfLogicalViews
+ + " logical views for each");
+ }
+ instance = new AjaxStateHolder(numbersOfViewsInSession,
+ numbersOfLogicalViews);
sessionMap.put(STATE_HOLDER, instance);
}
}
return instance;
}
- public synchronized Object getState(String viewId, Object sequence) {
+ public Object getState(String viewId, Object sequence) {
+ if (null == viewId) {
+ throw new NullPointerException(
+ "viewId parameter for get saved view state is null");
+ }
Object state = null;
- LRUMap viewVersions = (LRUMap) views.get(viewId);
- if (null != viewVersions) {
- if (null != sequence) {
- state = viewVersions.get(sequence);
+ synchronized (views) {
+ LRUMap viewVersions = (LRUMap) views.get(viewId);
+ if (null != viewVersions) {
+ if (null != sequence) {
+ state = viewVersions.get(sequence);
+ }
+ if (null == state) {
+ if (_log.isDebugEnabled()) {
+ _log.debug("No saved view state for sequence "+sequence+", use most
recent");
+ }
+ state = viewVersions.getMostRecent();
+ }
+ } else if (_log.isDebugEnabled()) {
+ _log.debug("No saved view states for viewId "+viewId);
}
- if (null == state) {
- state = viewVersions.values().iterator().next();
- }
}
return state;
}
- public synchronized void saveState(String viewId, Object sequence,
- Object state) {
- LRUMap viewVersions = (LRUMap) views.get(viewId);
- if (null == viewVersions) {
- // TODO - make size parameter configurable
- viewVersions = new LRUMap(AjaxStateManager.DEFAULT_NUMBER_OF_VIEWS);
- views.put(viewId, viewVersions);
+ public void saveState(String viewId, Object sequence, Object state) {
+ if (null == viewId) {
+ throw new NullPointerException(
+ "viewId parameter for save view state is null");
}
- viewVersions.put(sequence, state);
+ if (null == sequence) {
+ throw new NullPointerException(
+ "sequence parameter for save view state is null");
+ }
+ if (null != state) {
+ if (_log.isDebugEnabled()) {
+ _log.debug("Save new viewState in session for viewId "+viewId+" and
sequence "+sequence);
+ }
+ synchronized (views) {
+ LRUMap viewVersions = (LRUMap) views.get(viewId);
+ if (null == viewVersions) {
+ // TODO - make size parameter configurable
+ viewVersions = new LRUMap(this.numberOfViews);
+ views.put(viewId, viewVersions);
+ }
+ viewVersions.put(sequence, state);
+ }
+
+ }
}
}
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2007-10-15
22:11:20 UTC (rev 3386)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2007-10-16
00:21:38 UTC (rev 3387)
@@ -59,7 +59,7 @@
private static final Class[] STATE_MANAGER_ARGUMENTS = new Class[] { StateManager.class
};
- protected static final int DEFAULT_NUMBER_OF_VIEWS = 16;
+ public static final int DEFAULT_NUMBER_OF_VIEWS = 16;
private static final String VIEW_STATES_MAP = AjaxStateManager.class
.getName()
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
(rev 0)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2007-10-16
00:21:38 UTC (rev 3387)
@@ -0,0 +1,103 @@
+/**
+ *
+ */
+package org.ajax4jsf.context;
+
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.application.AjaxStateManager;
+
+/**
+ * This class hold all methods for get application init parameters. Created for
+ * single access point to all parameters - simplest for a documentation.
+ *
+ * @author asmirnov
+ *
+ */
+public class ContextInitParameters {
+
+ /**
+ *
+ */
+ private ContextInitParameters() {
+ // this is a only static methods for a access to Web app Init
+ // parameters. Do not Instantiate !
+ }
+
+ public static final String[] NUMBER_OF_VIEWS_IN_SESSION =
{"com.sun.faces.numberOfViewsInSession"};
+ public static final String[] NUMBER_OF_LOGICAL_VIEWS_IN_SESSION =
{"com.sun.faces.numberOfLogicalViews"};
+
+ /**
+ * Get number of views for store in session by {@link AjaxStateManager}
+ * @param context - current faces context.
+ * @return
+ */
+ public static int getNumbersOfViewsInSession(FacesContext context) {
+ return getInteger(context, NUMBER_OF_VIEWS_IN_SESSION,
+ AjaxStateManager.DEFAULT_NUMBER_OF_VIEWS);
+ }
+
+ /**
+ * Get number of logical views for store in session for every viewId by {@link
AjaxStateManager}
+ * @param context - current faces context.
+ * @return
+ */
+ public static int getNumbersOfLogicalViews(FacesContext context) {
+ return getInteger(context, NUMBER_OF_LOGICAL_VIEWS_IN_SESSION,
+ AjaxStateManager.DEFAULT_NUMBER_OF_VIEWS);
+ }
+
+ static int getInteger(FacesContext context, String[] paramNames,
+ int defaulValue) {
+ String initParameter = getInitParameter(context,paramNames);
+ if (null == initParameter) {
+ return defaulValue;
+ } else {
+ try {
+ return Integer.parseInt(initParameter);
+
+ } catch (NumberFormatException e) {
+ throw new FacesException("Context parameter " + paramNames
+ + " must have integer value");
+ }
+ }
+ }
+
+ static String getString(FacesContext context, String[] paramNames,
+ String defaulValue) {
+ String initParameter = getInitParameter(context,paramNames);
+ if (null == initParameter) {
+ return defaulValue;
+ } else {
+ return initParameter;
+ }
+ }
+
+ static boolean getBoolean(FacesContext context, String[] paramNames,
+ boolean defaulValue) {
+ String initParameter = getInitParameter(context,paramNames);
+ if (null == initParameter) {
+ return defaulValue;
+ } else if("true".equalsIgnoreCase(initParameter) ||
"yes".equalsIgnoreCase(initParameter)) {
+ return true;
+ } else if("false".equalsIgnoreCase(initParameter) ||
"no".equalsIgnoreCase(initParameter)) {
+ return false;
+ } else {
+ throw new FacesException("Illegal value ["+initParameter+"] for a init
parameter +"+paramNames+", only logical values 'true' or 'false'
is allowed");
+ }
+ }
+
+ static String getInitParameter(FacesContext context,
+ String[] paramNames) {
+ ExternalContext externalContext = context.getExternalContext();
+ String value = null;
+ for (int i = 0; i < paramNames.length && null == value; i++) {
+ value = externalContext.getInitParameter(paramNames[i]);
+ }
+ return value;
+ }
+
+
+}
Property changes on:
trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/util/LRUMap.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/util/LRUMap.java 2007-10-15 22:11:20
UTC (rev 3386)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/util/LRUMap.java 2007-10-16 00:21:38
UTC (rev 3387)
@@ -4,6 +4,7 @@
package org.ajax4jsf.util;
import java.io.Serializable;
+import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map.Entry;
@@ -20,13 +21,32 @@
private static final long serialVersionUID = -7232885382582796665L;
private int capacity;
+
+ /**
+ * @param capacity - maximal cache capacity.
+ */
public LRUMap(int capacity) {
super(capacity, 1.0f,true);
this.capacity = capacity;
}
- protected boolean removeEldestEntry(Entry arg0) {
+
+ protected boolean removeEldestEntry(Entry entry) {
// Remove last entry if size exceeded.
return size()>capacity;
}
+
+ /**
+ * Get most recent used element
+ * @return the most Recent value
+ */
+ public Object getMostRecent() {
+ Iterator iterator = values().iterator();
+ Object mostRecent=null;
+ while (iterator.hasNext()) {
+ mostRecent = iterator.next();
+
+ }
+ return mostRecent;
+ }
}
Added: trunk/framework/impl/src/test/java/org/ajax4jsf/util/LRUMapTest.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/util/LRUMapTest.java
(rev 0)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/util/LRUMapTest.java 2007-10-16
00:21:38 UTC (rev 3387)
@@ -0,0 +1,97 @@
+/**
+ *
+ */
+package org.ajax4jsf.util;
+
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+import junit.framework.TestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class LRUMapTest extends TestCase {
+
+ /**
+ * @param name
+ */
+ public LRUMapTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for {@link org.ajax4jsf.util.LRUMap#LRUMap(int)}.
+ */
+ public void testLRUMap() {
+ LRUMap map = new LRUMap(5);
+ for (int i = 0; i < 10; i++) {
+ map.put(new Integer(i), "Val"+(new Integer(i)));
+ }
+ assertEquals(map.size(), 5);
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.util.LRUMap#removeEldestEntry(java.util.Map.Entry)}.
+ */
+ public void testRemoveEldestEntryEntry() {
+
+ LRUMap map = new LRUMap(5){
+ protected boolean removeEldestEntry(Entry arg0) {
+ boolean eldestEntry = super.removeEldestEntry(arg0);
+ assertTrue(eldestEntry ^ size()<=5);
+ return false;
+ }
+ };
+ for (int i = 0; i < 10; i++) {
+ map.put(new Integer(i), "Val"+(new Integer(i)));
+ }
+ }
+
+ /**
+ * Test method for {@link java.util.HashMap#put(K, V)}.
+ */
+ public void testPut() {
+ LRUMap map = new LRUMap(5);
+ for (int i = 0; i < 10; i++) {
+ map.put(new Integer(i), "Val"+(new Integer(i)));
+ }
+ assertEquals(map.size(), 5);
+ Iterator iterator = map.values().iterator();
+ for (int i = 5; i < 10; i++) {
+ assertTrue(iterator.hasNext());
+ assertEquals("Val"+(new Integer(i)), iterator.next());
+ }
+ assertFalse(iterator.hasNext());
+ }
+
+ public void testGetMostRecent() throws Exception {
+ LRUMap map = new LRUMap(5);
+ for (int i = 0; i < 10; i++) {
+ String last = "Val"+(new Integer(i));
+ map.put(new Integer(i), last);
+ assertSame(last, map.getMostRecent());
+ }
+ assertEquals(map.size(), 5);
+ for (int i = 5; i < 10; i++) {
+ Object lastGet = map.get(new Integer(i));
+ assertSame(lastGet, map.getMostRecent());
+ }
+
+ }
+}
Property changes on: trunk/framework/impl/src/test/java/org/ajax4jsf/util/LRUMapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added:
trunk/framework/test/src/test/java/org/ajax4jsf/application/AjaxStateHolderTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/ajax4jsf/application/AjaxStateHolderTest.java
(rev 0)
+++
trunk/framework/test/src/test/java/org/ajax4jsf/application/AjaxStateHolderTest.java 2007-10-16
00:21:38 UTC (rev 3387)
@@ -0,0 +1,68 @@
+/**
+ *
+ */
+package org.ajax4jsf.application;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class AjaxStateHolderTest extends AbstractAjax4JsfTestCase {
+
+ /**
+ * @param name
+ */
+ public AjaxStateHolderTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.application.AjaxStateHolder#getInstance(javax.faces.context.FacesContext)}.
+ */
+ public void testGetInstance() {
+ AjaxStateHolder ajaxStateHolder = AjaxStateHolder.getInstance(facesContext);
+ assertNotNull(ajaxStateHolder);
+ AjaxStateHolder ajaxStateHolder2 = AjaxStateHolder.getInstance(facesContext);
+ assertSame(ajaxStateHolder, ajaxStateHolder2);
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.application.AjaxStateHolder#getState(java.lang.String, java.lang.Object)}.
+ */
+ public void testGetState() {
+ Object state = new Object();
+ Object state2 = new Object();
+ AjaxStateHolder ajaxStateHolder = AjaxStateHolder.getInstance(facesContext);
+ assertNull(ajaxStateHolder.getState("foo", "_id1"));
+ ajaxStateHolder.saveState("foo", "_id1", state);
+ ajaxStateHolder.saveState("foo", "_id2", state2);
+ assertNull(ajaxStateHolder.getState("bar", "_id1"));
+ assertSame(state2,ajaxStateHolder.getState("foo",null));
+ assertSame(state,ajaxStateHolder.getState("foo","_id1"));
+ assertSame(state,ajaxStateHolder.getState("foo","_id3"));
+ Object state3 = new Object();
+ Object state4 = new Object();
+ ajaxStateHolder.saveState("bar", "_id1", state3);
+ ajaxStateHolder.saveState("bar", "_id2", state4);
+ assertSame(state3,ajaxStateHolder.getState("bar","_id1"));
+ assertSame(state,ajaxStateHolder.getState("foo","_id3"));
+ }
+
+
+}
Property changes on:
trunk/framework/test/src/test/java/org/ajax4jsf/application/AjaxStateHolderTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/framework/test/src/test/java/org/ajax4jsf/context/InitParametersTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/ajax4jsf/context/InitParametersTest.java
(rev 0)
+++
trunk/framework/test/src/test/java/org/ajax4jsf/context/InitParametersTest.java 2007-10-16
00:21:38 UTC (rev 3387)
@@ -0,0 +1,132 @@
+/**
+ *
+ */
+package org.ajax4jsf.context;
+
+import java.util.Map;
+
+import javax.faces.FacesException;
+
+import org.ajax4jsf.application.AjaxStateManager;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class InitParametersTest extends AbstractAjax4JsfTestCase {
+
+ private static final String STRING_PARAM = "init";
+ private static final int INT_PARAM = 367;
+ private static final String NO = "no";
+ private static final String TRUE = "true";
+ private static final String ORG_AJAX4JSF_STRING = "org.ajax4jsf.STRING";
+ private static final String ORG_AJAX4JSF_INT = "org.ajax4jsf.INT";
+ private static final String ORG_AJAX4JSF_FALSE = "org.ajax4jsf.FALSE";
+ private static final String ORG_AJAX4JSF_TRUE = "org.ajax4jsf.TRUE";
+
+ /**
+ * @param name
+ */
+ public InitParametersTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ servletContext.addInitParameter(ORG_AJAX4JSF_TRUE, TRUE);
+ servletContext.addInitParameter(ORG_AJAX4JSF_FALSE, NO);
+ servletContext.addInitParameter(ORG_AJAX4JSF_INT, String.valueOf(INT_PARAM));
+ servletContext.addInitParameter(ORG_AJAX4JSF_STRING, STRING_PARAM);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.context.ContextInitParameters#getNumbersOfViewsInSession(javax.faces.context.FacesContext)}.
+ */
+ public void testGetNumbersOfViewsInSession() {
+ assertEquals(AjaxStateManager.DEFAULT_NUMBER_OF_VIEWS,
ContextInitParameters.getNumbersOfViewsInSession(facesContext));
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.context.ContextInitParameters#getNumbersOfLogicalViews(javax.faces.context.FacesContext)}.
+ */
+ public void testGetNumbersOfLogicalViews() {
+ assertEquals(AjaxStateManager.DEFAULT_NUMBER_OF_VIEWS,
ContextInitParameters.getNumbersOfLogicalViews(facesContext));
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.context.ContextInitParameters#getInteger(javax.faces.context.FacesContext,
java.lang.String[], int)}.
+ */
+ public void testGetInteger() {
+ String[] params = {"foo.bar",ORG_AJAX4JSF_INT};
+ int value = ContextInitParameters.getInteger(facesContext, params, 12);
+ assertEquals(INT_PARAM, value);
+ String[] params2 = {"foo.bar"};
+ value = ContextInitParameters.getInteger(facesContext, params2, 12);
+ assertEquals(12, value);
+ String[] params3 = {"foo.bar",ORG_AJAX4JSF_STRING};
+ try {
+ value = ContextInitParameters.getInteger(facesContext, params3, 12);
+ } catch (FacesException e) {
+ return;
+ }
+ assertFalse("No exception on invalid parameter",true);
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.context.ContextInitParameters#getString(javax.faces.context.FacesContext,
java.lang.String[], java.lang.String)}.
+ */
+ public void testGetString() {
+ String[] params = {"foo.bar",ORG_AJAX4JSF_STRING};
+ String value = ContextInitParameters.getString(facesContext, params, "foo");
+ assertEquals(STRING_PARAM, value);
+ String[] params2 = {"foo.bar"};
+ value = ContextInitParameters.getString(facesContext, params2, "foo");
+ assertEquals("foo", value);
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.context.ContextInitParameters#getBoolean(javax.faces.context.FacesContext,
java.lang.String[], boolean)}.
+ */
+ public void testGetBoolean() {
+ String[] params = {"foo.bar",ORG_AJAX4JSF_TRUE};
+ boolean value = ContextInitParameters.getBoolean(facesContext, params, false);
+ assertTrue(value);
+ String[] params2 = {"foo.bar"};
+ value = ContextInitParameters.getBoolean(facesContext, params2, true);
+ assertTrue(value);
+ String[] params3 = {"foo.bar",ORG_AJAX4JSF_FALSE};
+ value = ContextInitParameters.getBoolean(facesContext, params3, true);
+ assertFalse(value);
+ String[] params4 = {"foo.bar",ORG_AJAX4JSF_STRING};
+ try {
+ value = ContextInitParameters.getBoolean(facesContext, params4, false);
+ } catch (FacesException e) {
+ return;
+ }
+ assertFalse("No exception on invalid parameter",true);
+ }
+
+ /**
+ * Test method for {@link
org.ajax4jsf.context.ContextInitParameters#getInitParameter(javax.faces.context.FacesContext,
java.lang.String[])}.
+ */
+ public void testGetInitParameter() {
+ String[] params = {"foo.bar",ORG_AJAX4JSF_STRING};
+ String value = ContextInitParameters.getInitParameter(facesContext, params);
+ assertEquals(STRING_PARAM, value);
+ String[] params2 = {"foo.bar"};
+ value = ContextInitParameters.getInitParameter(facesContext, params2);
+ assertNull(value);
+ }
+
+}
Property changes on:
trunk/framework/test/src/test/java/org/ajax4jsf/context/InitParametersTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author