You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/08/28 20:59:24 UTC
svn commit: r990408 [1/10] - in /myfaces/test/trunk:
test12/src/main/java/org/apache/myfaces/test/base/
test12/src/main/java/org/apache/myfaces/test/base/junit4/
test12/src/main/java/org/apache/myfaces/test/cargo/
test12/src/main/java/org/apache/myface...
Author: lu4242
Date: Sat Aug 28 18:59:21 2010
New Revision: 990408
URL: http://svn.apache.org/viewvc?rev=990408&view=rev
Log:
correct format to ASF style
Modified:
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractViewControllerTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractViewControllerTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/cargo/CargoTestSetup.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/AbstractELResolver.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/FacesImplicitObjectELResolver.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/FacesPropertyResolverChainWrapper.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/FacesResourceBundleELResolver.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/FacesScopedAttributeELResolver.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/FacesVariableResolverChainWrapper.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/MockELContext.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/MockExpressionFactory.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/MockFunctionMapper.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/MockMethodExpression.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/MockValueExpression.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/MockVariableMapper.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/MockVariableValueExpression.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/htmlunit/AbstractHtmlUnitTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/htmlunit/junit4/AbstractHtmlUnitTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/jmock/AbstractJmockJsfTestCase.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockActionListener.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockApplication.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockApplication12.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockApplicationFactory.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockEnumeration.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockExternalContext.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockExternalContext12.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockFacesContext.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockFacesContext12.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockFacesContextFactory.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockHttpServletRequest.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockHttpServletResponse.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockHttpSession.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockMethodBinding.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockNavigationHandler.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockPortletContext.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockPortletRequest.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockPortletResponse.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockPortletSession.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockPrincipal.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockPrintWriter.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockPropertyResolver.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockRenderKitFactory.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockResponseStateManager.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockResponseWriter.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockServlet.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockServletConfig.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockServletOutputStream.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockStateManager.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockValueBinding.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockVariableResolver.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/MockViewHandler.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_AbstractAttributeMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_ApplicationMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_CookieMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_Hex.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_InitParameterMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_RequestHeaderMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_RequestHeaderValuesMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_RequestMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_RequestParameterMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_RequestParameterValuesMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/_SessionMap.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/ApplyRequestValuesExecutor.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/DefaultRestoreViewSupport.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/InvokeApplicationExecutor.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycle.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycleFactory.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/PhaseExecutor.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/PhaseListenerManager.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/ProcessValidationsExecutor.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RenderResponseExecutor.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewExecutor.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewSupport.java
myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/UpdateModelValuesExecutor.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/config/ConfigParserTestCase.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/config/MyConverter.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/config/MyRenderer.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/el/MockExpressionFactoryTestCase.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/el/MockValueExpressionTest.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/mock/MockBean.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/mock/MockHttpSessionTest.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/mock/MockObjectsTestCase.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/mock/ValueBindingTest.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/mock/data/Bean.java
myfaces/test/trunk/test12/src/test/java/org/apache/myfaces/test/runner/WebXmlParameter.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/config/ConfigParser.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/jmock/AbstractJmockJsfTestCase.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplication20.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplicationFactory.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandler.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExternalContext20.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContext20.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContextFactory.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFlash.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockPartialViewContext.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockResponseStateManager.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockSubKeyMap.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockViewHandler20.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockClassLoaderResourceLoader.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockExternalContextResourceLoader.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockResource.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockResourceHandler.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockResourceHandlerSupport.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockResourceLoader.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockResourceMeta.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockSimpleResource.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/resource/MockSimpleResourceHandler.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/visit/FullVisitContext.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/visit/MockVisitContext.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/visit/MockVisitContextFactory.java
myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/visit/PartialVisitContext.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/config/ConfigParserTestCase.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/config/MyBehavior.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/config/MyConverter.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/config/MyRenderer.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/config/MyValidator.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/mock/MockApplication20TestCase.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/mock/MockExternalContext20TestCase.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/mock/MockFacesContext20TestCase.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/mock/MockPartialViewContextTestCase.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/mock/MockResourceTestCase.java
myfaces/test/trunk/test20/src/test/java/org/apache/myfaces/test/mock/MockVisitTestCase.java
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java Sat Aug 28 18:59:21 2010
@@ -73,34 +73,36 @@ import org.apache.myfaces.test.mock.life
* @since 1.0.0
*/
-public abstract class AbstractJsfTestCase extends TestCase {
-
+public abstract class AbstractJsfTestCase extends TestCase
+{
// ------------------------------------------------------------ Constructors
-
/**
* <p>Construct a new instance of this test case.</p>
*
* @param name Name of this test case
*/
- public AbstractJsfTestCase(String name) {
+ public AbstractJsfTestCase(String name)
+ {
super(name);
}
-
// ---------------------------------------------------- Overall Test Methods
-
/**
* <p>Set up instance variables required by this test case.</p>
*/
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception
+ {
// Set up a new thread context class loader
- threadContextClassLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(new URLClassLoader(new URL[0],
- this.getClass().getClassLoader()));
+ threadContextClassLoader = Thread.currentThread()
+ .getContextClassLoader();
+ Thread.currentThread()
+ .setContextClassLoader(
+ new URLClassLoader(new URL[0], this.getClass()
+ .getClassLoader()));
// Set up Servlet API Objects
setUpServletObjects();
@@ -112,7 +114,7 @@ public abstract class AbstractJsfTestCas
setUpJSFObjects();
}
-
+
/**
* <p>Setup JSF object used for the test. By default it calls to the following
* methods in this order:</p>
@@ -128,7 +130,7 @@ public abstract class AbstractJsfTestCas
*
* @throws Exception
*/
- protected void setUpJSFObjects() throws Exception
+ protected void setUpJSFObjects() throws Exception
{
setUpExternalContext();
setUpLifecycle();
@@ -137,7 +139,7 @@ public abstract class AbstractJsfTestCas
setUpApplication();
setUpRenderKit();
}
-
+
/**
* <p>Setup servlet objects that will be used for the test:</p>
*
@@ -151,7 +153,7 @@ public abstract class AbstractJsfTestCas
*
* @throws Exception
*/
- protected void setUpServletObjects() throws Exception
+ protected void setUpServletObjects() throws Exception
{
servletContext = new MockServletContext();
config = new MockServletConfig(servletContext);
@@ -161,22 +163,22 @@ public abstract class AbstractJsfTestCas
request.setServletContext(servletContext);
response = new MockHttpServletResponse();
}
-
+
/**
* <p>Set JSF factories using FactoryFinder method setFactory.</p>
*
* @throws Exception
*/
- protected void setFactories() throws Exception
+ protected void setFactories() throws Exception
{
FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
- "org.apache.myfaces.test.mock.MockApplicationFactory");
+ "org.apache.myfaces.test.mock.MockApplicationFactory");
FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY,
- "org.apache.myfaces.test.mock.MockFacesContextFactory");
+ "org.apache.myfaces.test.mock.MockFacesContextFactory");
FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY,
- "org.apache.myfaces.test.mock.lifecycle.MockLifecycleFactory");
+ "org.apache.myfaces.test.mock.lifecycle.MockLifecycleFactory");
FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY,
- "org.apache.myfaces.test.mock.MockRenderKitFactory");
+ "org.apache.myfaces.test.mock.MockRenderKitFactory");
}
/**
@@ -187,8 +189,8 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpExternalContext() throws Exception
{
- externalContext =
- new MockExternalContext(servletContext, request, response);
+ externalContext = new MockExternalContext(servletContext, request,
+ response);
}
/**
@@ -199,12 +201,12 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpLifecycle() throws Exception
{
- lifecycleFactory = (MockLifecycleFactory)
- FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
- lifecycle = (MockLifecycle)
- lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
+ lifecycleFactory = (MockLifecycleFactory) FactoryFinder
+ .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
+ lifecycle = (MockLifecycle) lifecycleFactory
+ .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
}
-
+
/**
* Setup the <code>facesContextFactory</code> and <code>facesContext</code>
* variable. Before end, by default it override <code>externalContext</code>
@@ -216,16 +218,14 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpFacesContext() throws Exception
{
- facesContextFactory = (MockFacesContextFactory)
- FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
- facesContext = (MockFacesContext)
- facesContextFactory.getFacesContext(servletContext,
- request,
- response,
- lifecycle);
+ facesContextFactory = (MockFacesContextFactory) FactoryFinder
+ .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
+ facesContext = (MockFacesContext) facesContextFactory.getFacesContext(
+ servletContext, request, response, lifecycle);
if (facesContext.getExternalContext() != null)
{
- externalContext = (MockExternalContext) facesContext.getExternalContext();
+ externalContext = (MockExternalContext) facesContext
+ .getExternalContext();
}
}
@@ -242,7 +242,7 @@ public abstract class AbstractJsfTestCas
root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
facesContext.setViewRoot(root);
}
-
+
/**
* Setup the <code>application</code> variable and before
* the end by default it is assigned to the <code>facesContext</code>
@@ -252,12 +252,12 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpApplication() throws Exception
{
- ApplicationFactory applicationFactory = (ApplicationFactory)
- FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
+ ApplicationFactory applicationFactory = (ApplicationFactory) FactoryFinder
+ .getFactory(FactoryFinder.APPLICATION_FACTORY);
application = (MockApplication) applicationFactory.getApplication();
facesContext.setApplication(application);
}
-
+
/**
* Setup the <code>renderKit</code> variable. This is a good place to use
* <code>ConfigParser</code> to register converters, validators, components
@@ -267,21 +267,24 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpRenderKit() throws Exception
{
- RenderKitFactory renderKitFactory = (RenderKitFactory)
- FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
renderKit = new MockRenderKit();
- renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT, renderKit);
+ renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT,
+ renderKit);
}
/**
* <p>Tear down instance variables required by this test case.</p>
*/
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception
+ {
application = null;
config = null;
externalContext = null;
- if (facesContext != null) {
+ if (facesContext != null)
+ {
facesContext.release();
}
facesContext = null;
@@ -299,23 +302,21 @@ public abstract class AbstractJsfTestCas
}
-
// ------------------------------------------------------ Instance Variables
-
// Mock object instances for our tests
- protected MockApplication application = null;
- protected MockServletConfig config = null;
- protected MockExternalContext externalContext = null;
- protected MockFacesContext facesContext = null;
+ protected MockApplication application = null;
+ protected MockServletConfig config = null;
+ protected MockExternalContext externalContext = null;
+ protected MockFacesContext facesContext = null;
protected MockFacesContextFactory facesContextFactory = null;
- protected MockLifecycle lifecycle = null;
- protected MockLifecycleFactory lifecycleFactory = null;
- protected MockRenderKit renderKit = null;
- protected MockHttpServletRequest request = null;
+ protected MockLifecycle lifecycle = null;
+ protected MockLifecycleFactory lifecycleFactory = null;
+ protected MockRenderKit renderKit = null;
+ protected MockHttpServletRequest request = null;
protected MockHttpServletResponse response = null;
- protected MockServletContext servletContext = null;
- protected MockHttpSession session = null;
+ protected MockServletContext servletContext = null;
+ protected MockHttpSession session = null;
// Thread context class loader saved and restored after each test
private ClassLoader threadContextClassLoader = null;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractViewControllerTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractViewControllerTestCase.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractViewControllerTestCase.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/AbstractViewControllerTestCase.java Sat Aug 28 18:59:21 2010
@@ -31,30 +31,28 @@ import java.util.Iterator;
*
* @since 1.0.0
*/
-public abstract class AbstractViewControllerTestCase extends AbstractJsfTestCase {
+public abstract class AbstractViewControllerTestCase extends
+ AbstractJsfTestCase
+{
// ------------------------------------------------------------ Constructors
-
/**
* <p>Construct a new instance of this test case.</p>
*
* @param name Test case name
*/
- public AbstractViewControllerTestCase(String name) {
+ public AbstractViewControllerTestCase(String name)
+ {
super(name);
}
-
// ---------------------------------------------------- Overall Test Methods
-
// ------------------------------------------------------ Instance Variables
-
// ------------------------------------------------------- Protected Methods
-
/**
* <p>Test that the specified number of messages have been queued on the
* <code>FacesContext</code> instance, without regard to matching a
@@ -62,11 +60,13 @@ public abstract class AbstractViewContro
*
* @param expected The expected number of messages
*/
- protected void checkMessageCount(int expected) {
+ protected void checkMessageCount(int expected)
+ {
int actual = 0;
Iterator messages = facesContext.getMessages();
- while (messages.hasNext()) {
+ while (messages.hasNext())
+ {
messages.next();
actual++;
}
@@ -74,7 +74,6 @@ public abstract class AbstractViewContro
}
-
/**
* <p>Test that the specified number of messages have been queued on the
* <code>FacesContext</code> instance, for the specified client id.</p>
@@ -83,11 +82,13 @@ public abstract class AbstractViewContro
* count queued messages
* @param expected The expected number of messages
*/
- protected void checkMessageCount(String clientId, int expected) {
+ protected void checkMessageCount(String clientId, int expected)
+ {
int actual = 0;
Iterator messages = facesContext.getMessages(clientId);
- while (messages.hasNext()) {
+ while (messages.hasNext())
+ {
messages.next();
actual++;
}
@@ -95,5 +96,4 @@ public abstract class AbstractViewContro
}
-
}
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java Sat Aug 28 18:59:21 2010
@@ -75,12 +75,11 @@ import org.junit.Before;
* @since 1.0.0
*/
-public abstract class AbstractJsfConfigurableMockTestCase {
-
+public abstract class AbstractJsfConfigurableMockTestCase
+{
// ------------------------------------------------------------ Constructors
-
/**
* <p>Construct a new instance of this test case.</p>
*
@@ -90,20 +89,22 @@ public abstract class AbstractJsfConfigu
{
}
-
// ---------------------------------------------------- Overall Test Methods
-
/**
* <p>Set up instance variables required by this test case.</p>
*/
@Before
- public void setUp() throws Exception {
+ public void setUp() throws Exception
+ {
// Set up a new thread context class loader
- threadContextClassLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(new URLClassLoader(new URL[0],
- this.getClass().getClassLoader()));
+ threadContextClassLoader = Thread.currentThread()
+ .getContextClassLoader();
+ Thread.currentThread()
+ .setContextClassLoader(
+ new URLClassLoader(new URL[0], this.getClass()
+ .getClassLoader()));
// Set up Servlet API Objects
setUpServletObjects();
@@ -115,7 +116,7 @@ public abstract class AbstractJsfConfigu
setUpJSFObjects();
}
-
+
/**
* <p>Setup JSF object used for the test. By default it calls to the following
* methods in this order:</p>
@@ -131,7 +132,7 @@ public abstract class AbstractJsfConfigu
*
* @throws Exception
*/
- protected void setUpJSFObjects() throws Exception
+ protected void setUpJSFObjects() throws Exception
{
setUpExternalContext();
setUpLifecycle();
@@ -140,7 +141,7 @@ public abstract class AbstractJsfConfigu
setUpApplication();
setUpRenderKit();
}
-
+
/**
* <p>Setup servlet objects that will be used for the test:</p>
*
@@ -154,7 +155,7 @@ public abstract class AbstractJsfConfigu
*
* @throws Exception
*/
- protected void setUpServletObjects() throws Exception
+ protected void setUpServletObjects() throws Exception
{
servletContext = new MockServletContext();
config = new MockServletConfig(servletContext);
@@ -164,22 +165,22 @@ public abstract class AbstractJsfConfigu
request.setServletContext(servletContext);
response = new MockHttpServletResponse();
}
-
+
/**
* <p>Set JSF factories using FactoryFinder method setFactory.</p>
*
* @throws Exception
*/
- protected void setFactories() throws Exception
+ protected void setFactories() throws Exception
{
FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
- "org.apache.myfaces.test.mock.MockApplicationFactory");
+ "org.apache.myfaces.test.mock.MockApplicationFactory");
FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY,
- "org.apache.myfaces.test.mock.MockFacesContextFactory");
+ "org.apache.myfaces.test.mock.MockFacesContextFactory");
FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY,
- "org.apache.myfaces.test.mock.lifecycle.MockLifecycleFactory");
+ "org.apache.myfaces.test.mock.lifecycle.MockLifecycleFactory");
FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY,
- "org.apache.myfaces.test.mock.MockRenderKitFactory");
+ "org.apache.myfaces.test.mock.MockRenderKitFactory");
}
/**
@@ -190,8 +191,8 @@ public abstract class AbstractJsfConfigu
*/
protected void setUpExternalContext() throws Exception
{
- externalContext =
- new MockExternalContext(servletContext, request, response);
+ externalContext = new MockExternalContext(servletContext, request,
+ response);
}
/**
@@ -202,12 +203,12 @@ public abstract class AbstractJsfConfigu
*/
protected void setUpLifecycle() throws Exception
{
- lifecycleFactory = (LifecycleFactory)
- FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
- lifecycle =
- lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
+ lifecycleFactory = (LifecycleFactory) FactoryFinder
+ .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
+ lifecycle = lifecycleFactory
+ .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
}
-
+
/**
* Setup the <code>facesContextFactory</code> and <code>facesContext</code>
* variable. Before end, by default it override <code>externalContext</code>
@@ -219,13 +220,10 @@ public abstract class AbstractJsfConfigu
*/
protected void setUpFacesContext() throws Exception
{
- facesContextFactory = (FacesContextFactory)
- FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
- facesContext = (FacesContext)
- facesContextFactory.getFacesContext(servletContext,
- request,
- response,
- lifecycle);
+ facesContextFactory = (FacesContextFactory) FactoryFinder
+ .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
+ facesContext = (FacesContext) facesContextFactory.getFacesContext(
+ servletContext, request, response, lifecycle);
if (facesContext.getExternalContext() != null)
{
externalContext = facesContext.getExternalContext();
@@ -245,7 +243,7 @@ public abstract class AbstractJsfConfigu
root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
facesContext.setViewRoot(root);
}
-
+
/**
* Setup the <code>application</code> variable and before
* the end by default it is assigned to the <code>facesContext</code>
@@ -255,12 +253,12 @@ public abstract class AbstractJsfConfigu
*/
protected void setUpApplication() throws Exception
{
- ApplicationFactory applicationFactory = (ApplicationFactory)
- FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
+ ApplicationFactory applicationFactory = (ApplicationFactory) FactoryFinder
+ .getFactory(FactoryFinder.APPLICATION_FACTORY);
application = applicationFactory.getApplication();
- ((MockFacesContext)facesContext).setApplication(application);
+ ((MockFacesContext) facesContext).setApplication(application);
}
-
+
/**
* Setup the <code>renderKit</code> variable. This is a good place to use
* <code>ConfigParser</code> to register converters, validators, components
@@ -270,22 +268,25 @@ public abstract class AbstractJsfConfigu
*/
protected void setUpRenderKit() throws Exception
{
- RenderKitFactory renderKitFactory = (RenderKitFactory)
- FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
renderKit = new MockRenderKit();
- renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT, renderKit);
+ renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT,
+ renderKit);
}
/**
* <p>Tear down instance variables required by this test case.</p>
*/
@After
- public void tearDown() throws Exception {
+ public void tearDown() throws Exception
+ {
application = null;
config = null;
externalContext = null;
- if (facesContext != null) {
+ if (facesContext != null)
+ {
facesContext.release();
}
facesContext = null;
@@ -303,23 +304,21 @@ public abstract class AbstractJsfConfigu
}
-
// ------------------------------------------------------ Instance Variables
-
// Mock object instances for our tests
- protected Application application = null;
- protected MockServletConfig config = null;
- protected ExternalContext externalContext = null;
- protected FacesContext facesContext = null;
- protected FacesContextFactory facesContextFactory = null;
- protected Lifecycle lifecycle = null;
- protected LifecycleFactory lifecycleFactory = null;
- protected RenderKit renderKit = null;
- protected MockHttpServletRequest request = null;
+ protected Application application = null;
+ protected MockServletConfig config = null;
+ protected ExternalContext externalContext = null;
+ protected FacesContext facesContext = null;
+ protected FacesContextFactory facesContextFactory = null;
+ protected Lifecycle lifecycle = null;
+ protected LifecycleFactory lifecycleFactory = null;
+ protected RenderKit renderKit = null;
+ protected MockHttpServletRequest request = null;
protected MockHttpServletResponse response = null;
- protected MockServletContext servletContext = null;
- protected MockHttpSession session = null;
+ protected MockServletContext servletContext = null;
+ protected MockHttpSession session = null;
// Thread context class loader saved and restored after each test
private ClassLoader threadContextClassLoader = null;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java Sat Aug 28 18:59:21 2010
@@ -73,12 +73,11 @@ import org.junit.Before;
* @since 1.0.0
*/
-public abstract class AbstractJsfTestCase {
-
+public abstract class AbstractJsfTestCase
+{
// ------------------------------------------------------------ Constructors
-
/**
* <p>Construct a new instance of this test case.</p>
*
@@ -88,20 +87,22 @@ public abstract class AbstractJsfTestCas
{
}
-
// ---------------------------------------------------- Overall Test Methods
-
/**
* <p>Set up instance variables required by this test case.</p>
*/
@Before
- public void setUp() throws Exception {
+ public void setUp() throws Exception
+ {
// Set up a new thread context class loader
- threadContextClassLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(new URLClassLoader(new URL[0],
- this.getClass().getClassLoader()));
+ threadContextClassLoader = Thread.currentThread()
+ .getContextClassLoader();
+ Thread.currentThread()
+ .setContextClassLoader(
+ new URLClassLoader(new URL[0], this.getClass()
+ .getClassLoader()));
// Set up Servlet API Objects
setUpServletObjects();
@@ -113,7 +114,7 @@ public abstract class AbstractJsfTestCas
setUpJSFObjects();
}
-
+
/**
* <p>Setup JSF object used for the test. By default it calls to the following
* methods in this order:</p>
@@ -129,7 +130,7 @@ public abstract class AbstractJsfTestCas
*
* @throws Exception
*/
- protected void setUpJSFObjects() throws Exception
+ protected void setUpJSFObjects() throws Exception
{
setUpExternalContext();
setUpLifecycle();
@@ -138,7 +139,7 @@ public abstract class AbstractJsfTestCas
setUpApplication();
setUpRenderKit();
}
-
+
/**
* <p>Setup servlet objects that will be used for the test:</p>
*
@@ -152,7 +153,7 @@ public abstract class AbstractJsfTestCas
*
* @throws Exception
*/
- protected void setUpServletObjects() throws Exception
+ protected void setUpServletObjects() throws Exception
{
servletContext = new MockServletContext();
config = new MockServletConfig(servletContext);
@@ -162,22 +163,22 @@ public abstract class AbstractJsfTestCas
request.setServletContext(servletContext);
response = new MockHttpServletResponse();
}
-
+
/**
* <p>Set JSF factories using FactoryFinder method setFactory.</p>
*
* @throws Exception
*/
- protected void setFactories() throws Exception
+ protected void setFactories() throws Exception
{
FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
- "org.apache.myfaces.test.mock.MockApplicationFactory");
+ "org.apache.myfaces.test.mock.MockApplicationFactory");
FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY,
- "org.apache.myfaces.test.mock.MockFacesContextFactory");
+ "org.apache.myfaces.test.mock.MockFacesContextFactory");
FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY,
- "org.apache.myfaces.test.mock.lifecycle.MockLifecycleFactory");
+ "org.apache.myfaces.test.mock.lifecycle.MockLifecycleFactory");
FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY,
- "org.apache.myfaces.test.mock.MockRenderKitFactory");
+ "org.apache.myfaces.test.mock.MockRenderKitFactory");
}
/**
@@ -188,8 +189,8 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpExternalContext() throws Exception
{
- externalContext =
- new MockExternalContext(servletContext, request, response);
+ externalContext = new MockExternalContext(servletContext, request,
+ response);
}
/**
@@ -200,12 +201,12 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpLifecycle() throws Exception
{
- lifecycleFactory = (MockLifecycleFactory)
- FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
- lifecycle = (MockLifecycle)
- lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
+ lifecycleFactory = (MockLifecycleFactory) FactoryFinder
+ .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
+ lifecycle = (MockLifecycle) lifecycleFactory
+ .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
}
-
+
/**
* Setup the <code>facesContextFactory</code> and <code>facesContext</code>
* variable. Before end, by default it override <code>externalContext</code>
@@ -217,16 +218,14 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpFacesContext() throws Exception
{
- facesContextFactory = (MockFacesContextFactory)
- FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
- facesContext = (MockFacesContext)
- facesContextFactory.getFacesContext(servletContext,
- request,
- response,
- lifecycle);
+ facesContextFactory = (MockFacesContextFactory) FactoryFinder
+ .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
+ facesContext = (MockFacesContext) facesContextFactory.getFacesContext(
+ servletContext, request, response, lifecycle);
if (facesContext.getExternalContext() != null)
{
- externalContext = (MockExternalContext) facesContext.getExternalContext();
+ externalContext = (MockExternalContext) facesContext
+ .getExternalContext();
}
}
@@ -243,7 +242,7 @@ public abstract class AbstractJsfTestCas
root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
facesContext.setViewRoot(root);
}
-
+
/**
* Setup the <code>application</code> variable and before
* the end by default it is assigned to the <code>facesContext</code>
@@ -253,12 +252,12 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpApplication() throws Exception
{
- ApplicationFactory applicationFactory = (ApplicationFactory)
- FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
+ ApplicationFactory applicationFactory = (ApplicationFactory) FactoryFinder
+ .getFactory(FactoryFinder.APPLICATION_FACTORY);
application = (MockApplication) applicationFactory.getApplication();
facesContext.setApplication(application);
}
-
+
/**
* Setup the <code>renderKit</code> variable. This is a good place to use
* <code>ConfigParser</code> to register converters, validators, components
@@ -268,22 +267,25 @@ public abstract class AbstractJsfTestCas
*/
protected void setUpRenderKit() throws Exception
{
- RenderKitFactory renderKitFactory = (RenderKitFactory)
- FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
renderKit = new MockRenderKit();
- renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT, renderKit);
+ renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT,
+ renderKit);
}
/**
* <p>Tear down instance variables required by this test case.</p>
*/
@After
- public void tearDown() throws Exception {
+ public void tearDown() throws Exception
+ {
application = null;
config = null;
externalContext = null;
- if (facesContext != null) {
+ if (facesContext != null)
+ {
facesContext.release();
}
facesContext = null;
@@ -301,23 +303,21 @@ public abstract class AbstractJsfTestCas
}
-
// ------------------------------------------------------ Instance Variables
-
// Mock object instances for our tests
- protected MockApplication application = null;
- protected MockServletConfig config = null;
- protected MockExternalContext externalContext = null;
- protected MockFacesContext facesContext = null;
+ protected MockApplication application = null;
+ protected MockServletConfig config = null;
+ protected MockExternalContext externalContext = null;
+ protected MockFacesContext facesContext = null;
protected MockFacesContextFactory facesContextFactory = null;
- protected MockLifecycle lifecycle = null;
- protected MockLifecycleFactory lifecycleFactory = null;
- protected MockRenderKit renderKit = null;
- protected MockHttpServletRequest request = null;
+ protected MockLifecycle lifecycle = null;
+ protected MockLifecycleFactory lifecycleFactory = null;
+ protected MockRenderKit renderKit = null;
+ protected MockHttpServletRequest request = null;
protected MockHttpServletResponse response = null;
- protected MockServletContext servletContext = null;
- protected MockHttpSession session = null;
+ protected MockServletContext servletContext = null;
+ protected MockHttpSession session = null;
// Thread context class loader saved and restored after each test
private ClassLoader threadContextClassLoader = null;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractViewControllerTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractViewControllerTestCase.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractViewControllerTestCase.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/base/junit4/AbstractViewControllerTestCase.java Sat Aug 28 18:59:21 2010
@@ -33,30 +33,28 @@ import org.junit.Assert;
*
* @since 1.0.0
*/
-public abstract class AbstractViewControllerTestCase extends AbstractJsfTestCase {
+public abstract class AbstractViewControllerTestCase extends
+ AbstractJsfTestCase
+{
// ------------------------------------------------------------ Constructors
-
/**
* <p>Construct a new instance of this test case.</p>
*
* @param name Test case name
*/
- public AbstractViewControllerTestCase() {
+ public AbstractViewControllerTestCase()
+ {
super();
}
-
// ---------------------------------------------------- Overall Test Methods
-
// ------------------------------------------------------ Instance Variables
-
// ------------------------------------------------------- Protected Methods
-
/**
* <p>Test that the specified number of messages have been queued on the
* <code>FacesContext</code> instance, without regard to matching a
@@ -64,11 +62,13 @@ public abstract class AbstractViewContro
*
* @param expected The expected number of messages
*/
- protected void checkMessageCount(int expected) {
+ protected void checkMessageCount(int expected)
+ {
int actual = 0;
Iterator messages = facesContext.getMessages();
- while (messages.hasNext()) {
+ while (messages.hasNext())
+ {
messages.next();
actual++;
}
@@ -76,7 +76,6 @@ public abstract class AbstractViewContro
}
-
/**
* <p>Test that the specified number of messages have been queued on the
* <code>FacesContext</code> instance, for the specified client id.</p>
@@ -85,11 +84,13 @@ public abstract class AbstractViewContro
* count queued messages
* @param expected The expected number of messages
*/
- protected void checkMessageCount(String clientId, int expected) {
+ protected void checkMessageCount(String clientId, int expected)
+ {
int actual = 0;
Iterator messages = facesContext.getMessages(clientId);
- while (messages.hasNext()) {
+ while (messages.hasNext())
+ {
messages.next();
actual++;
}
@@ -97,5 +98,4 @@ public abstract class AbstractViewContro
}
-
}
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/cargo/CargoTestSetup.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/cargo/CargoTestSetup.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/cargo/CargoTestSetup.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/cargo/CargoTestSetup.java Sat Aug 28 18:59:21 2010
@@ -41,7 +41,8 @@ import org.codehaus.cargo.util.log.FileL
*
* @since 1.0.0
*/
-public class CargoTestSetup extends TestSetup {
+public class CargoTestSetup extends TestSetup
+{
// ------------------------------------------------------------ Constructors
@@ -50,7 +51,8 @@ public class CargoTestSetup extends Test
*
* @param test Tests to be run within this test setup.
*/
- public CargoTestSetup(Test test) {
+ public CargoTestSetup(Test test)
+ {
super(test);
}
@@ -80,13 +82,15 @@ public class CargoTestSetup extends Test
*
* @throws Exception if an error occurs.
*/
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception
+ {
super.setUp();
// If there is no container id, default to Tomcat 5x
String containerId = System.getProperty("cargo.container.id");
- if (containerId == null) {
+ if (containerId == null)
+ {
containerId = Tomcat5xInstalledLocalContainer.ID;
}
System.out.println("[INFO] container id: " + containerId);
@@ -95,37 +99,33 @@ public class CargoTestSetup extends Test
String deployablePath = System.getProperty("cargo.deployable");
System.out.println("[INFO] deployable: " + deployablePath);
Deployable war = new DefaultDeployableFactory().createDeployable(
- containerId,
- deployablePath,
- DeployableType.WAR);
+ containerId, deployablePath, DeployableType.WAR);
// Container configuration
- ConfigurationFactory configurationFactory =
- new DefaultConfigurationFactory();
+ ConfigurationFactory configurationFactory = new DefaultConfigurationFactory();
- LocalConfiguration configuration =
- (LocalConfiguration) configurationFactory.createConfiguration(
- containerId,
- ConfigurationType.STANDALONE);
+ LocalConfiguration configuration = (LocalConfiguration) configurationFactory
+ .createConfiguration(containerId, ConfigurationType.STANDALONE);
// Find and (if provided) set the port to use for the container.
String servletPort = System.getProperty("cargo.servlet.port");
- if (servletPort != null) {
+ if (servletPort != null)
+ {
configuration.setProperty("cargo.servlet.port", servletPort);
System.out.println("[INFO] servlet port: " + servletPort);
}
configuration.addDeployable(war);
- container = (InstalledLocalContainer)
- new DefaultContainerFactory().createContainer(
- containerId,
- ContainerType.INSTALLED, configuration);
+ container = (InstalledLocalContainer) new DefaultContainerFactory()
+ .createContainer(containerId, ContainerType.INSTALLED,
+ configuration);
// If 'cargo.container.home' is not set, or if an expression was
// passed through, try to use the TOMCAT_HOME environment variable.
String containerHome = System.getProperty("cargo.container.home");
- if (containerHome == null || containerHome.startsWith("$")) {
+ if (containerHome == null || containerHome.startsWith("$"))
+ {
containerHome = System.getenv("TOMCAT_HOME");
}
System.out.println("[INFO] container home: " + containerHome);
@@ -133,14 +133,16 @@ public class CargoTestSetup extends Test
// Find and (if provided) set the path to a log file
String containerLog = System.getProperty("cargo.container.log");
- if (containerLog != null) {
+ if (containerLog != null)
+ {
System.out.println("[INFO] container log: " + containerLog);
container.setLogger(new FileLogger(containerLog, false));
}
// Find and (if provided) set the path to an output file
String containerOutput = System.getProperty("cargo.container.output");
- if (containerOutput != null) {
+ if (containerOutput != null)
+ {
System.out.println("[INFO] container output: " + containerOutput);
container.setOutput(new File(containerOutput));
}
@@ -148,18 +150,17 @@ public class CargoTestSetup extends Test
container.start();
}
-
/**
* Stop the container after running the tests.
*
* @throws Exception if an error occurs.
*/
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception
+ {
container.stop();
super.tearDown();
}
-
/**
* Return the name of the test setup.
* (Temporarily required due to MSUREFIRE-119.)
@@ -168,9 +169,9 @@ public class CargoTestSetup extends Test
* @deprecated No replacement.
*/
- public String getName() {
+ public String getName()
+ {
return "CargoTestSetup";
}
}
-
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/config/ConfigParser.java Sat Aug 28 18:59:21 2010
@@ -56,54 +56,42 @@ import java.net.URL;
*
* @since 1.0.0
*/
-public class ConfigParser {
-
+public class ConfigParser
+{
// ------------------------------------------------------------ Constructors
-
/** Creates a new instance of ConfigParser */
- public ConfigParser() {
+ public ConfigParser()
+ {
}
-
// ------------------------------------------------------ Manifest Constants
-
/**
* <p>Configuration resource URLs for the JSF RI.</p>
*/
- private static final String[] JSFRI_RESOURCES =
- { "/com/sun/faces/jsf-ri-runtime.xml",
- };
-
+ private static final String[] JSFRI_RESOURCES = { "/com/sun/faces/jsf-ri-runtime.xml", };
/**
* <p>Configuration resource URLs for Apache MyFaces.</p>
*/
- private static final String[] MYFACES_RESOURCES =
- { "/org/apache/myfaces/resource/standard-faces-config.xml",
- };
+ private static final String[] MYFACES_RESOURCES = { "/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",
- };
+ private static final String[] MYFACES_RESOURCES12 = { "/META-INF/standard-faces-config.xml", };
// ------------------------------------------------------ Instance Variables
-
/**
* <p>The <code>Digester</code> instance we will use for parsing.</p>
*/
private Digester digester = null;
-
// ------------------------------------------------------- Public Properties
-
/**
* <p>Return the URLs of the platform configuration resources for this
* application. The following platforms are currently supported:</p>
@@ -115,12 +103,15 @@ public class ConfigParser {
* <p>If MyFaces (version 1.2), currently under development, does not change
* the name of the configuration resource, it will be supported as well.</p>
*/
- public URL[] getPlatformURLs() {
+ public URL[] getPlatformURLs()
+ {
URL[] urls = translate(JSFRI_RESOURCES);
- if (urls[0] == null) {
+ if (urls[0] == null)
+ {
urls = translate(MYFACES_RESOURCES12);
- if (urls[0] == null) {
+ if (urls[0] == null)
+ {
urls = translate(MYFACES_RESOURCES);
}
}
@@ -128,10 +119,8 @@ public class ConfigParser {
}
-
// ---------------------------------------------------------- Public Methods
-
/**
* <p>Parse the specified JavaServer Faces configuration resource, causing
* the appropriate JSF artifacts to be registered with the mock object
@@ -142,25 +131,28 @@ public class ConfigParser {
* @exception IOException if an input/output error occurs
* @exception SAXException if a parsing error occurs
*/
- public void parse(URL url) throws IOException, SAXException {
+ public void parse(URL url) throws IOException, SAXException
+ {
// Acquire and configure the Digester instance we will use
Digester digester = digester();
- ApplicationFactory factory = (ApplicationFactory)
- FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
+ ApplicationFactory factory = (ApplicationFactory) FactoryFinder
+ .getFactory(FactoryFinder.APPLICATION_FACTORY);
Application application = factory.getApplication();
digester.push(application);
// Perform the required parsing
- try {
+ try
+ {
digester.parse(url);
- } finally {
+ }
+ finally
+ {
digester.clear();
}
}
-
/**
* <p>Parse the specified set of JavaServer Faces configuration resources,
* in the listed order, causing the appropriate JSF artifacts to be registered
@@ -171,226 +163,272 @@ public class ConfigParser {
* @exception IOException if an input/output error occurs
* @exception SAXException if a parsing error occurs
*/
- public void parse(URL[] urls) throws IOException, SAXException {
+ public void parse(URL[] urls) throws IOException, SAXException
+ {
- for (int i = 0; i < urls.length; i++) {
+ for (int i = 0; i < urls.length; i++)
+ {
parse(urls[i]);
}
}
-
// --------------------------------------------------------- Private Methods
-
/**
* <p>Return the <code>Digester</code> instance we will use for parsing,
* creating and configuring a new instance if necessary.</p>
*/
- private Digester digester() {
+ private Digester digester()
+ {
- if (this.digester == null) {
+ if (this.digester == null)
+ {
this.digester = new Digester();
digester.addRule("faces-config/component", new ComponentRule());
- digester.addCallMethod
- ("faces-config/component/component-type", "setComponentType", 0);
- digester.addCallMethod
- ("faces-config/component/component-class", "setComponentClass", 0);
+ digester.addCallMethod("faces-config/component/component-type",
+ "setComponentType", 0);
+ digester.addCallMethod("faces-config/component/component-class",
+ "setComponentClass", 0);
digester.addRule("faces-config/converter", new ConverterRule());
- digester.addCallMethod
- ("faces-config/converter/converter-id", "setConverterId", 0);
- digester.addCallMethod
- ("faces-config/converter/converter-class", "setConverterClass", 0);
- digester.addCallMethod
- ("faces-config/converter/converter-for-class", "setConverterForClass", 0);
+ digester.addCallMethod("faces-config/converter/converter-id",
+ "setConverterId", 0);
+ digester.addCallMethod("faces-config/converter/converter-class",
+ "setConverterClass", 0);
+ digester.addCallMethod(
+ "faces-config/converter/converter-for-class",
+ "setConverterForClass", 0);
digester.addRule("faces-config/render-kit", new RenderKitRule());
- digester.addRule("faces-config/render-kit/render-kit-id", new RenderKitIdRule());
- digester.addRule("faces-config/render-kit/renderer", new RendererRule());
- digester.addCallMethod
- ("faces-config/render-kit/renderer/component-family", "setComponentFamily", 0);
- digester.addCallMethod
- ("faces-config/render-kit/renderer/renderer-class", "setRendererClass", 0);
- digester.addCallMethod
- ("faces-config/render-kit/renderer/renderer-type", "setRendererType", 0);
+ digester.addRule("faces-config/render-kit/render-kit-id",
+ new RenderKitIdRule());
+ digester.addRule("faces-config/render-kit/renderer",
+ new RendererRule());
+ digester.addCallMethod(
+ "faces-config/render-kit/renderer/component-family",
+ "setComponentFamily", 0);
+ digester.addCallMethod(
+ "faces-config/render-kit/renderer/renderer-class",
+ "setRendererClass", 0);
+ digester.addCallMethod(
+ "faces-config/render-kit/renderer/renderer-type",
+ "setRendererType", 0);
digester.addRule("faces-config/validator", new ValidatorRule());
- digester.addCallMethod
- ("faces-config/validator/validator-id", "setValidatorId", 0);
- digester.addCallMethod
- ("faces-config/validator/validator-class", "setValidatorClass", 0);
+ digester.addCallMethod("faces-config/validator/validator-id",
+ "setValidatorId", 0);
+ digester.addCallMethod("faces-config/validator/validator-class",
+ "setValidatorClass", 0);
}
return this.digester;
}
-
/**
* <p>Translate an array of resource names into an array of resource URLs.</p>
*
* @param names Resource names to translate
*/
- private URL[] translate(String[] names) {
+ private URL[] translate(String[] names)
+ {
URL[] results = new URL[names.length];
- for (int i = 0; i < names.length; i++) {
+ for (int i = 0; i < names.length; i++)
+ {
results[i] = this.getClass().getResource(names[i]);
}
return results;
-
- }
+ }
// --------------------------------------------------------- Private Classes
-
/**
* <p>Data bean that stores information related to a component.</p>
*/
- class ComponentBean {
+ class ComponentBean
+ {
private String componentClass;
- public String getComponentClass() {
+
+ public String getComponentClass()
+ {
return this.componentClass;
}
- public void setComponentClass(String componentClass) {
+
+ public void setComponentClass(String componentClass)
+ {
this.componentClass = componentClass;
}
private String componentType;
- public String getComponentType() {
+
+ public String getComponentType()
+ {
return this.componentType;
}
- public void setComponentType(String componentType) {
+
+ public void setComponentType(String componentType)
+ {
this.componentType = componentType;
}
}
-
/**
* <p>Digester <code>Rule</code> for processing components.</p>
*/
- class ComponentRule extends Rule {
+ class ComponentRule extends Rule
+ {
- public void begin(String namespace, String name, Attributes attributes) {
+ public void begin(String namespace, String name, Attributes attributes)
+ {
getDigester().push(new ComponentBean());
}
- public void end(String namespace, String name) {
+ public void end(String namespace, String name)
+ {
ComponentBean bean = (ComponentBean) getDigester().pop();
Application application = (Application) getDigester().peek();
- application.addComponent(bean.getComponentType(), bean.getComponentClass());
+ application.addComponent(bean.getComponentType(), bean
+ .getComponentClass());
}
}
-
/**
* <p>Data bean that stores information related to a converter.</p>
*/
- class ConverterBean {
+ class ConverterBean
+ {
private String converterClass;
- public String getConverterClass() {
+
+ public String getConverterClass()
+ {
return this.converterClass;
}
- public void setConverterClass(String converterClass) {
+
+ public void setConverterClass(String converterClass)
+ {
this.converterClass = converterClass;
}
private String converterForClass;
- public String getConverterForClass() {
+
+ public String getConverterForClass()
+ {
return this.converterForClass;
}
- public void setConverterForClass(String converterForClass) {
+
+ public void setConverterForClass(String converterForClass)
+ {
this.converterForClass = converterForClass;
}
private String converterId;
- public String getConverterId() {
+
+ public String getConverterId()
+ {
return this.converterId;
}
- public void setConverterId(String converterId) {
+
+ public void setConverterId(String converterId)
+ {
this.converterId = converterId;
}
}
-
/**
* <p>Digester <code>Rule</code> for processing converers.</p>
*/
- class ConverterRule extends Rule {
+ class ConverterRule extends Rule
+ {
- public void begin(String namespace, String name, Attributes attributes) {
+ public void begin(String namespace, String name, Attributes attributes)
+ {
getDigester().push(new ConverterBean());
}
- public void end(String namespace, String name) {
+ public void end(String namespace, String name)
+ {
ConverterBean bean = (ConverterBean) getDigester().pop();
Application application = (Application) getDigester().peek();
- if (bean.getConverterId() != null) {
- application.addConverter(bean.getConverterId(), bean.getConverterClass());
- } else {
+ if (bean.getConverterId() != null)
+ {
+ application.addConverter(bean.getConverterId(), bean
+ .getConverterClass());
+ }
+ else
+ {
Class clazz = null;
- try {
+ try
+ {
clazz = classForName(bean.getConverterForClass());
- } catch (ClassNotFoundException e) {
- throw new IllegalArgumentException("java.lang.ClassNotFoundException: "
- + bean.getConverterForClass());
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalArgumentException(
+ "java.lang.ClassNotFoundException: "
+ + bean.getConverterForClass());
}
application.addConverter(clazz, bean.getConverterClass());
}
}
}
-
+
private Class classForName(String type) throws ClassNotFoundException
{
try
{
// Try WebApp ClassLoader first
- return Class.forName(type,
- false, // do not initialize for faster startup
- Thread.currentThread().getContextClassLoader());
+ return Class.forName(type, false, // do not initialize for faster startup
+ Thread.currentThread().getContextClassLoader());
}
catch (ClassNotFoundException ignore)
{
// fallback: Try ClassLoader for ClassUtils (i.e. the myfaces.jar lib)
- return Class.forName(type,
- false, // do not initialize for faster startup
- this.getClass().getClassLoader());
- }
+ return Class.forName(type, false, // do not initialize for faster startup
+ this.getClass().getClassLoader());
+ }
}
/**
* <p>Digester <code>Rule</code> for processing render kits.</p>
*/
- class RenderKitRule extends Rule {
+ class RenderKitRule extends Rule
+ {
- public void begin(String namespace, String name, Attributes attributes) {
- RenderKitFactory factory = (RenderKitFactory)
- FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
- getDigester().push(factory.getRenderKit(null, RenderKitFactory.HTML_BASIC_RENDER_KIT));
+ public void begin(String namespace, String name, Attributes attributes)
+ {
+ RenderKitFactory factory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ getDigester().push(
+ factory.getRenderKit(null,
+ RenderKitFactory.HTML_BASIC_RENDER_KIT));
}
- public void end(String namespace, String name) {
+ public void end(String namespace, String name)
+ {
getDigester().pop();
}
}
-
/**
* <p>Digester <code>Rule</code> for processing render kit identifiers.</p>
*/
- class RenderKitIdRule extends Rule {
+ class RenderKitIdRule extends Rule
+ {
- public void body(String namespace, String name, String text) {
+ public void body(String namespace, String name, String text)
+ {
String renderKitId = text.trim();
- RenderKitFactory factory = (RenderKitFactory)
- FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ RenderKitFactory factory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
RenderKit renderKit = factory.getRenderKit(null, renderKitId);
- if (renderKit == null) {
+ if (renderKit == null)
+ {
renderKit = new MockRenderKit();
factory.addRenderKit(renderKitId, renderKit);
}
@@ -400,108 +438,136 @@ public class ConfigParser {
}
-
/**
* <p>Data bean that stores information related to a renderer.</p>
*/
- class RendererBean {
+ class RendererBean
+ {
private String componentFamily;
- public String getComponentFamily() {
+
+ public String getComponentFamily()
+ {
return this.componentFamily;
}
- public void setComponentFamily(String componentFamily) {
+
+ public void setComponentFamily(String componentFamily)
+ {
this.componentFamily = componentFamily;
}
private String rendererClass;
- public String getRendererClass() {
+
+ public String getRendererClass()
+ {
return this.rendererClass;
}
- public void setRendererClass(String rendererClass) {
+
+ public void setRendererClass(String rendererClass)
+ {
this.rendererClass = rendererClass;
}
private String rendererType;
- public String getRendererType() {
+
+ public String getRendererType()
+ {
return this.rendererType;
}
- public void setRendererType(String rendererType) {
+
+ public void setRendererType(String rendererType)
+ {
this.rendererType = rendererType;
}
}
-
/**
* <p>Digester <code>Rule</code> for processing renderers.</p>
*/
- class RendererRule extends Rule {
+ class RendererRule extends Rule
+ {
- public void begin(String namespace, String name, Attributes attributes) {
+ public void begin(String namespace, String name, Attributes attributes)
+ {
getDigester().push(new RendererBean());
}
- public void end(String namespace, String name) {
+ public void end(String namespace, String name)
+ {
RendererBean bean = (RendererBean) getDigester().pop();
RenderKit kit = (RenderKit) getDigester().peek();
Renderer renderer = null;
Class clazz = null;
- try {
+ try
+ {
clazz = classForName(bean.getRendererClass());
renderer = (Renderer) clazz.newInstance();
- } catch (Exception e) {
- throw new IllegalArgumentException("Exception while trying to instantiate"
- + " renderer class '" + bean.getRendererClass() + "' : "
- + e.getMessage());
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException(
+ "Exception while trying to instantiate"
+ + " renderer class '" + bean.getRendererClass()
+ + "' : " + e.getMessage());
}
kit.addRenderer(bean.getComponentFamily(), bean.getRendererType(),
- renderer);
+ renderer);
}
}
-
/**
* <p>Data bean that stores information related to a validator.</p>
*/
- class ValidatorBean {
+ class ValidatorBean
+ {
private String validatorClass;
- public String getValidatorClass() {
+
+ public String getValidatorClass()
+ {
return this.validatorClass;
}
- public void setValidatorClass(String validatorClass) {
+
+ public void setValidatorClass(String validatorClass)
+ {
this.validatorClass = validatorClass;
}
private String validatorId;
- public String getValidatorId() {
+
+ public String getValidatorId()
+ {
return this.validatorId;
}
- public void setValidatorId(String validatorId) {
+
+ public void setValidatorId(String validatorId)
+ {
this.validatorId = validatorId;
}
}
-
/**
* <p>Digester <code>Rule</code> for processing validators.</p>
*/
- class ValidatorRule extends Rule {
+ class ValidatorRule extends Rule
+ {
- public void begin(String namespace, String name, Attributes attributes) {
+ public void begin(String namespace, String name, Attributes attributes)
+ {
getDigester().push(new ValidatorBean());
}
- public void end(String namespace, String name) {
+ public void end(String namespace, String name)
+ {
ValidatorBean bean = (ValidatorBean) getDigester().pop();
Application application = (Application) getDigester().peek();
- application.addValidator(bean.getValidatorId(), bean.getValidatorClass());
+ application.addValidator(bean.getValidatorId(), bean
+ .getValidatorClass());
}
}
-
}
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/AbstractELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/AbstractELResolver.java?rev=990408&r1=990407&r2=990408&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/AbstractELResolver.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/el/AbstractELResolver.java Sat Aug 28 18:59:21 2010
@@ -25,13 +25,11 @@ import javax.el.ELResolver;
*
* @since 1.0.0
*/
-abstract class AbstractELResolver extends ELResolver {
-
-
+abstract class AbstractELResolver extends ELResolver
+{
// ------------------------------------------------------- Protected Methods
-
/**
* <p>Create and return a <code>FeatureDescriptor</code> configured with
* the specified arguments.</p>
@@ -47,27 +45,32 @@ abstract class AbstractELResolver extend
* @param designTime Flag indicating feature is resolvable at design time
*/
protected FeatureDescriptor descriptor(String name, String displayName,
- String description, boolean expert, boolean hidden, boolean preferred,
- Object type, boolean designTime) {
-
- FeatureDescriptor descriptor = new FeatureDescriptor();
+ String description, boolean expert, boolean hidden,
+ boolean preferred, Object type, boolean designTime)
+ {
+
+ FeatureDescriptor descriptor = new FeatureDescriptor();
+
+ descriptor.setName(name);
+ descriptor.setDisplayName(displayName);
+ descriptor.setShortDescription(description);
+ descriptor.setExpert(expert);
+ descriptor.setHidden(hidden);
+ descriptor.setPreferred(preferred);
+ descriptor.setValue(ELResolver.TYPE, type);
+ if (designTime)
+ {
+ descriptor.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME,
+ Boolean.TRUE);
+ }
+ else
+ {
+ descriptor.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME,
+ Boolean.FALSE);
+ }
- descriptor.setName(name);
- descriptor.setDisplayName(displayName);
- descriptor.setShortDescription(description);
- descriptor.setExpert(expert);
- descriptor.setHidden(hidden);
- descriptor.setPreferred(preferred);
- descriptor.setValue(ELResolver.TYPE, type);
- if (designTime) {
- descriptor.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
- } else {
- descriptor.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
- }
-
- return descriptor;
+ return descriptor;
}
-
}