You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by aw...@apache.org on 2006/05/30 23:56:13 UTC
svn commit: r410407 - in /incubator/adffaces/trunk/adf-faces: ./
adf-faces-api/ adf-faces-api/src/mock/java/org/apache/myfaces/adfbuild/
adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/
adf-faces-api/src/test/java/org/apache/myfa...
Author: awiner
Date: Tue May 30 16:56:12 2006
New Revision: 410407
URL: http://svn.apache.org/viewvc?rev=410407&view=rev
Log:
Simplify build process a little by doing without mockmaker for adf-faces-api and adf-faces-impl
Added:
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adfbuild/
- copied from r410402, incubator/adffaces/trunk/adf-faces/adf-faces-api/src/mock/java/org/apache/myfaces/adfbuild/
Removed:
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/mock/java/org/apache/myfaces/adfbuild/
Modified:
incubator/adffaces/trunk/adf-faces/adf-faces-api/pom.xml
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfDateTimeConverterTest.java
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfNumberConverterTest.java
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/ConverterTestCase.java
incubator/adffaces/trunk/adf-faces/adf-faces-impl/pom.xml
incubator/adffaces/trunk/adf-faces/pom.xml
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/pom.xml?rev=410407&r1=410406&r2=410407&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-api/pom.xml (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-api/pom.xml Tue May 30 16:56:12 2006
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2006 The Apache Software Foundation.
@@ -14,202 +14,193 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project>
- <parent>
- <groupId>org.apache.myfaces.adf</groupId>
- <artifactId>adf-faces</artifactId>
- <version>incubator-m1-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
-
- <name>ADF Faces Apache API</name>
- <description>ADF JavaServer Faces Apache API</description>
-
- <artifactId>adf-faces-api</artifactId>
- <packaging>jar</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.myfaces.adfbuild</groupId>
- <artifactId>maven-jdev-plugin</artifactId>
- <configuration>
- <testSourceRoots>
- <testSourceRoot>src/mock/java</testSourceRoot>
- <testSourceRoot>target/maven-mock-plugin/mock/java</testSourceRoot>
- </testSourceRoots>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.myfaces.adfbuild</groupId>
- <artifactId>maven-mock-plugin</artifactId>
- <!-- TODO: move up to parent after MNG-985 is resolved -->
- <executions>
- <execution>
- <goals>
- <goal>generate-mock-sources</goal>
- <goal>mock-compile</goal>
- <goal>mock-package</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.myfaces.adfbuild</groupId>
- <artifactId>maven-xrts-plugin</artifactId>
- <!-- TODO: move up to parent after MNG-985 is resolved -->
- <executions>
- <execution>
- <goals>
- <goal>generate-sources</goal>
- <goal>generate-test-sources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <configuration>
- <filtering>true</filtering>
- </configuration>
- </plugin>
-
- <!-- TODO: remove once issue MNG-237 is resolved -->
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes implementation="java.util.ArrayList" >
- <include implementation="java.lang.String">**/*Test.java</include>
- </includes>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.myfaces.adfbuild</groupId>
- <artifactId>maven-faces-plugin</artifactId>
- <configuration>
- <typePrefix>org.apache</typePrefix>
- <packageContains>org.apache</packageContains>
- <!--suppressListenerMethods>true</suppressListenerMethods-->
- <force>true</force>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>generate-components</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.myfaces.adfbuild</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <configuration>
- <locale>en_US</locale>
- <force>true</force>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>generate-locale-elements</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.myfaces.adf</groupId>
- <artifactId>adf-faces-build</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
-
+<project>
+ <parent>
+ <groupId>org.apache.myfaces.adf</groupId>
+ <artifactId>adf-faces</artifactId>
+ <version>incubator-m1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>ADF Faces Apache API</name>
+ <description>ADF JavaServer Faces Apache API</description>
+
+ <artifactId>adf-faces-api</artifactId>
+ <packaging>jar</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.myfaces.adfbuild</groupId>
+ <artifactId>maven-jdev-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.myfaces.adfbuild</groupId>
+ <artifactId>maven-xrts-plugin</artifactId>
+ <!-- TODO: move up to parent after MNG-985 is resolved -->
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-sources</goal>
+ <goal>generate-test-sources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <configuration>
+ <filtering>true</filtering>
+ </configuration>
+ </plugin>
+
+ <!-- TODO: remove once issue MNG-237 is resolved -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes implementation="java.util.ArrayList" >
+ <include implementation="java.lang.String">**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.myfaces.adfbuild</groupId>
+ <artifactId>maven-faces-plugin</artifactId>
+ <configuration>
+ <typePrefix>org.apache</typePrefix>
+ <packageContains>org.apache</packageContains>
+ <!--suppressListenerMethods>true</suppressListenerMethods-->
+ <force>true</force>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-components</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.myfaces.adfbuild</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <configuration>
+ <locale>en_US</locale>
+ <force>true</force>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-locale-elements</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.myfaces.adf</groupId>
+ <artifactId>adf-faces-build</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-api</artifactId>
- </dependency>
-
- <!-- "test" scope dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-mock</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>mockmaker</groupId>
- <artifactId>mmmockobjects</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>mockobjects</groupId>
- <artifactId>mockobjects-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.myfaces.adfbuild</groupId>
- <artifactId>maven-tagdoc-plugin</artifactId>
- <version>1.0-alpha-3-SNAPSHOT</version>
- <configuration>
- <taglibs>
- <af>http://myfaces.apache.org/adf/faces</af>
- <afh>http://myfaces.apache.org/adf/faces/html</afh>
- </taglibs>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <showPackage>false</showPackage>
- <showProtected>true</showProtected>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <targetJdk>1.5</targetJdk>
- </configuration>
- </plugin>
-<!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
--->
- </plugins>
- </reporting>
-</project>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ </dependency>
+
+ <!-- "test" scope dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>mockmaker</groupId>
+ <artifactId>mmmockobjects</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>mockobjects</groupId>
+ <artifactId>mockobjects-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.myfaces.adfbuild</groupId>
+ <artifactId>maven-tagdoc-plugin</artifactId>
+ <version>1.0-alpha-3-SNAPSHOT</version>
+ <configuration>
+ <taglibs>
+ <af>http://myfaces.apache.org/adf/faces</af>
+ <afh>http://myfaces.apache.org/adf/faces/html</afh>
+ </taglibs>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <showPackage>false</showPackage>
+ <showProtected>true</showProtected>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+<!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+-->
+ </plugins>
+ </reporting>
+</project>
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java?rev=410407&r1=410406&r2=410407&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/core/data/CoreSelectRangeChoiceBarTest.java Tue May 30 16:56:12 2006
@@ -17,9 +17,12 @@
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
import org.apache.myfaces.adf.component.UIComponentTestCase;
import org.apache.myfaces.adf.event.RangeChangeEvent;
-import org.apache.myfaces.adf.event.MockRangeChangeListener;
+import org.apache.myfaces.adf.event.RangeChangeListener;
import junit.textui.TestRunner;
@@ -107,6 +110,21 @@
}
+ private class MockRangeChangeListener implements RangeChangeListener
+ {
+ public List list()
+ {
+ return _list;
+ }
+
+ public void processRangeChange(RangeChangeEvent event)
+ {
+ _list.add(event);
+ }
+
+ private List _list = new ArrayList();
+ }
+
/**
* Tests the invoke-application lifecycle phase.
*/
@@ -118,12 +136,10 @@
component.addRangeChangeListener(listener);
RangeChangeEvent event = new RangeChangeEvent(component, 0, 9, 10, 19);
- listener.addExpectedProcessRangeChangeValues(event);
- listener.setExpectedProcessRangeChangeCalls(1);
-
doTestInvokeApplication(component, event);
- listener.verify();
+ assertEquals(listener.list().size(), 1);
+ assertEquals(listener.list().get(0), event);
}
/**
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfDateTimeConverterTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfDateTimeConverterTest.java?rev=410407&r1=410406&r2=410407&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfDateTimeConverterTest.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfDateTimeConverterTest.java Tue May 30 16:56:12 2006
@@ -13,351 +13,339 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.myfaces.adf.convert;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Locale;
-import java.util.TimeZone;
-
-import javax.faces.component.UIViewRoot;
-import javax.faces.convert.Converter;
-import javax.faces.convert.ConverterException;
-
-import org.apache.myfaces.adf.context.AdfFacesContext;
-import org.apache.myfaces.adf.context.MockAdfFacesContext;
-
-import javax.faces.component.MockUIComponent;
-import javax.faces.context.MockFacesContext;
-
-import org.apache.myfaces.adfbuild.test.MockUtils;
-
-public class AdfDateTimeConverterTest extends DateTimeConverterTestCase
-{
- public AdfDateTimeConverterTest(String name)
- {
- super(name);
- }
-
- /**
- * @todo move this to the parent class once JSF fixes the bug
- */
- public void testEarlyExits()
- {
- checkNullComponent();
- checkNullContext();
- }
-
- public void testShortishForDatePatern()
- {
- GregorianCalendar gcal = new GregorianCalendar();
- gcal.set(2999,Calendar.JUNE,4,0,0,0);
-
- gcal.setTimeZone(DEFAULT_TIME_ZONE);
- // Make use of this date for testing.
- Date date = gcal.getTime();
-
- DateTimeConverter dtConv = new DateTimeConverter();
- MockFacesContext context = new MockFacesContext();
- MockUIComponent component = MockUtils.buildMockUIComponent();
- String inputValue = "6/4/2999";
-
- dtConv.setDateStyle("shortish");
- dtConv.setLocale(Locale.ENGLISH);
-
- Date dt = (Date) dtConv.getAsObject(context, component, inputValue);
- assertEquals(true, isEqual(date, dt));
-
- String exptectedStr = dtConv.getAsString(context, component, dt);
- assertEquals(inputValue, exptectedStr);
- context.verify();
- component.verify();
- }
-
- public void testShortishDateStyle()
- {
- doTestStyleValidity(_DATE_STYLE, new String[]{"shortish"});
- }
-
- public void testSecondaryPattern()
- {
- // Get as object should work fine - while getAsString is expected to fail
- GregorianCalendar gcal = new GregorianCalendar();
- gcal.set(1600,Calendar.JUNE,4,0,0,0);
-
- gcal.setTimeZone(DEFAULT_TIME_ZONE);
- // Make use of this date for testing.
- Date date = gcal.getTime();
-
- DateTimeConverter dtConv = new DateTimeConverter();
- MockFacesContext context = new MockFacesContext();
- MockUIComponent component = MockUtils.buildMockUIComponent();
- String inputValue = "6/4/1600";
- String secondaryPattern = "MM/d/yyyy";
-
- dtConv.setLocale(Locale.US);
- dtConv.setDateStyle("Let us unset it ");
- dtConv.setType("Let us un set it");
- dtConv.setSecondaryPattern(secondaryPattern);
- // This should work fine
- Date dt = (Date) dtConv.getAsObject(context, component, inputValue);
- assertEquals(true, isEqual(date, dt));
-
- try
- {
- dtConv.getAsString(context, component, dt);
- fail("Use of secondary pattern in the above fashion is expected to fail here");
- }
- catch (RuntimeException ce)
- {
- // Just proceed . This is the expected state
- }
-
- dtConv.setDateStyle("shortish");
- dtConv.setType("date");
-
- // now we set date and type so this is expected to work fine.
-
- String expectedOut = dtConv.getAsString(context, component, date);
- assertEquals(inputValue, expectedOut);
-
- context.verify();
- component.verify();
- }
-
- public void testLeniencyOnPrimaryPattern()
- {
- String primaryPattern = "MMM/d/yyyy";
- String secondaryPattern = null;
- dotestLeniencyOnPattern(primaryPattern, secondaryPattern);
- }
-
- public void testLeniencyOnSecondaryPattern()
- {
- String primaryPattern = null;
- String secondaryPattern = "MMM/d/yyyy";
- dotestLeniencyOnPattern(primaryPattern, secondaryPattern);
- }
-
- private void _setupFacesContext(MockFacesContext context, int count)
- {
- UIViewRoot uiRoot = new UIViewRoot();
- uiRoot.setLocale(Locale.ENGLISH);
-
- for (int j = 0; j < count; j++)
- context.setupGetViewRoot(uiRoot);
- }
-
- protected void dotestLeniencyOnPattern(
- String primaryPattern,
- String secondaryPatttern
- )
- {
- // inputs such as 6/7/2004 is also valid. Avoiding it since - equality
- // of the output is also compared.
-
- // Each of these inputs ends up causing the MessageFactory to grab the
- // label from the component a different number of times, so the number of
- // iterations to set the component up for is difficult to figure. The
- // numbers after the input string are the number of iterations of
- // getAttribute that we need to set up for.
- String[] validInputs =
- {
- "Jun/4/2004" /* 0 */, "Jun-4-2004" /* 10 */, "Jun.4.2004" /* 8 */,
- "06/4/2004" /* 4 */, "06-04-2004" /* 12 */, "06.04.2004" /* 2 */,
- "6/4/2004" /* 4 */, "6-4-2004" /* 12 */, "6.4.2004" /* 2 */
- };
-
- int iterations = (0 + 10 + 8 + 4 + 12 + 2 + 4 + 12 + 2);
- GregorianCalendar cal = new GregorianCalendar(2004, Calendar.JUNE, 4);
- cal.setTimeZone(DEFAULT_TIME_ZONE);
- Date dt = cal.getTime();
- MockUIComponent component
- = MockUtils.buildMockUIComponent(iterations);
- for (int i = 0; i < validInputs.length; i++)
- {
- MockFacesContext context = new MockFacesContext();
- DateTimeConverter
- dtConv = (DateTimeConverter) getDateTimeConverter();
- dtConv.setLocale(Locale.ENGLISH);
- dtConv.setPattern(primaryPattern);
- dtConv.setSecondaryPattern(secondaryPatttern);
- dtConv.setTimeZone(DEFAULT_TIME_ZONE);
- dtConv.setType("INVALID"); // make this type invalid
-
- _setupFacesContext(context, validInputs.length * 3);
-
- Date convDate = (Date) dtConv.getAsObject(context, component,
- validInputs[i]);
- assertEquals(convDate, dt);
- context.verify();
- component.verify();
- }
- }
-
- public void testCompareDateTimeConverter()
- {
- Object[][] data = _getDataForPatterns();
-
- for (int i = 0; i < data.length ; i++)
- {
- DateTimeConverter dtConv = new DateTimeConverter();
- dtConv.setPattern((String)data[i][0]);
- dtConv.setLocale((Locale)data[i][2]);
- dtConv.setTimeZone((TimeZone)data[i][3]);
- String inputValue = (String)data[i][1];
-
- javax.faces.convert.DateTimeConverter fdtConv
- = new javax.faces.convert.DateTimeConverter();
- fdtConv.setPattern((String)data[i][0]);
- fdtConv.setLocale((Locale)data[i][2]);
- fdtConv.setTimeZone((TimeZone)data[i][3]);
-
- MockFacesContext context = new MockFacesContext();
- _setupFacesContext(context, 4);
- MockUIComponent component = MockUtils.buildMockUIComponent();
- Date dtConvDate = (Date)dtConv.getAsObject(context, component, inputValue);
- Date fdtConvDate = (Date)fdtConv.getAsObject(context, component, inputValue);
- // assertEquals(dtConvDate, fdtConvDate);
-
- String dtConvPattern = dtConv.getAsString(context, component, dtConvDate);
- String fdtConvPattern = fdtConv.getAsString(context, component, dtConvDate);
- // assertEquals(dtConvPattern, fdtConvPattern);
- }
- }
-
- protected javax.faces.convert.DateTimeConverter getDateTimeConverter()
- {
- return new DateTimeConverter();
- }
-
- protected void setSecondaryPattern(
- javax.faces.convert.DateTimeConverter converter,
- String secondaryPattern
- )
- {
- ((DateTimeConverter)converter).setSecondaryPattern(secondaryPattern);
- }
-
- protected void doTestStateHolderSaveRestore(
- Converter conv1,
- Converter conv2,
- MockFacesContext context,
- MockUIComponent component
- )
- {
- super.doTestStateHolderSaveRestore(conv1, conv2, context, component);
- }
-
- public void testCustomMessageIsSet()
- {
- //default is shortish - M/d/yyyy
- //default time is short hh:m A.M/P.M
- //default both
- //let us choose pattern as M/d/yyyy
- String[] failingValues = {"15/2/2002", "02;30 A.M,", "15/2/2002 22:22 A*M.", "M/d/yyyy"};
- String[] types = {"date", "time", "both", "pattern"};
- String[] customMessage = {"date", "time", "both", "pattern"};
-
- for (int i = 0; i < failingValues.length ; i++)
- {
- MockFacesContext context = new MockFacesContext();
- MockUIComponent component = MockUtils.buildMockUIComponent(3 * 4);
-
- org.apache.myfaces.adf.convert.DateTimeConverter converter =
- new org.apache.myfaces.adf.convert.DateTimeConverter();
-
- UIViewRoot root = new UIViewRoot();
- root.setLocale(Locale.US);
-
- for (int j = 0; j < 3; j++)
- {
- for (int k = 0; k < 4; k++)
- context.setupGetViewRoot(root);
- }
-
- try
- {
- // ADF Converter is not lenient.
- converter.setConvertDateMessageDetail(customMessage[0]);
- converter.setConvertTimeMessageDetail(customMessage[1]);
- converter.setConvertBothMessageDetail(customMessage[2]);
- // pattern and date type is driven using the same message.
-
-
- if ("pattern".equals(types[i]))
- {
- converter.setPattern("M/d/yyyy");
- // There is no specific messaging scheme for pattern. So use the
- // dateMessageDetail itself for this.
- converter.setConvertDateMessageDetail(customMessage[3]);
- }
- else
- converter.setType(types[i]);
-
- Object obj = converter.getAsObject(context, component, failingValues[i]);
- fail("Expected converter exception");
- }
- catch (ConverterException ce)
- {
- // We expected a exception to occur
- String msg = ce.getFacesMessage().getDetail();
- assertEquals(msg, customMessage[i]);
- }
- }
- }
-
- protected void setUp()
- {
- _mafct = new MockAdfFacesContext();
- for (int i = 0; i < 70; i++)
- {
- _mafct.setupGetTwoDigitYearStart(1950);
- _mafct.setupGetTimeZone(DEFAULT_TIME_ZONE);
- }
- _afct = getCustomMockAdfFacesContext(_mafct);
- }
-
- protected void tearDown()
- {
-
- // AdfFacesContext uses a thread local variable to hold itself and has a
- // check in it. So you need to release, since all instances for tests
- // are created on the same thread by Junit.
- _afct.release();
- _mafct.verify();
- _mafct = null;
- _afct = null;
- }
-
- private Object[][] _getDataForPatterns()
- {
- // pattern, inputvalue,locale,timezone
- Object[][] data =
- {
- {"yyyy.MM.dd G 'at' HH:mm:ss z", "2001.07.04 AD at 12:08:56 PDT", Locale.US, null },
-
- {"EEE, MMM d, ''yy","Wed, Jul 4, '01", Locale.ENGLISH, getTzone("GMT")},
-
- {"h:mm a","12:08 PM", Locale.GERMAN, getTzone("GMT+1")},
-
- {"hh 'o''clock' a, zzzz","12 o'clock PM, Pacific Standard Time", Locale.CANADA, getTzone("GMT-8")},
-
- {"K:mm a, z","0:08 PM, PST", Locale.US, getTzone("PST")},
-
- {"yyyyy.MMMMM.dd GGG hh:mm aaa","02001.July.04 AD 12:08 PM", Locale.US, null},
- {"EEE, d MMM yyyy HH:mm:ss Z","Wed, 4 Jul 2001 12:08:56 GMT",Locale.US, getTzone("GMT")},
- {"yyMMddHHmmss", "010704120856", Locale.ENGLISH, null, null},
-
- };
- return data;
- }
-
- private AdfFacesContext _afct;
-
- private MockAdfFacesContext _mafct;
-
- private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getDefault();
-}
-
+package org.apache.myfaces.adf.convert;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import javax.faces.component.UIViewRoot;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+
+import org.apache.myfaces.adf.context.AdfFacesContext;
+import org.apache.myfaces.adf.context.MockAdfFacesContext;
+
+import javax.faces.component.MockUIComponent;
+import javax.faces.context.MockFacesContext;
+
+import org.apache.myfaces.adfbuild.test.MockUtils;
+
+public class AdfDateTimeConverterTest extends DateTimeConverterTestCase
+{
+ public AdfDateTimeConverterTest(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * @todo move this to the parent class once JSF fixes the bug
+ */
+ public void testEarlyExits()
+ {
+ checkNullComponent();
+ checkNullContext();
+ }
+
+ public void testShortishForDatePatern()
+ {
+ GregorianCalendar gcal = new GregorianCalendar();
+ gcal.set(2999,Calendar.JUNE,4,0,0,0);
+
+ gcal.setTimeZone(DEFAULT_TIME_ZONE);
+ // Make use of this date for testing.
+ Date date = gcal.getTime();
+
+ DateTimeConverter dtConv = new DateTimeConverter();
+ MockFacesContext context = new MockFacesContext();
+ MockUIComponent component = MockUtils.buildMockUIComponent();
+ String inputValue = "6/4/2999";
+
+ dtConv.setDateStyle("shortish");
+ dtConv.setLocale(Locale.ENGLISH);
+
+ Date dt = (Date) dtConv.getAsObject(context, component, inputValue);
+ assertEquals(true, isEqual(date, dt));
+
+ String exptectedStr = dtConv.getAsString(context, component, dt);
+ assertEquals(inputValue, exptectedStr);
+ context.verify();
+ component.verify();
+ }
+
+ public void testShortishDateStyle()
+ {
+ doTestStyleValidity(_DATE_STYLE, new String[]{"shortish"});
+ }
+
+ public void testSecondaryPattern()
+ {
+ // Get as object should work fine - while getAsString is expected to fail
+ GregorianCalendar gcal = new GregorianCalendar();
+ gcal.set(1600,Calendar.JUNE,4,0,0,0);
+
+ gcal.setTimeZone(DEFAULT_TIME_ZONE);
+ // Make use of this date for testing.
+ Date date = gcal.getTime();
+
+ DateTimeConverter dtConv = new DateTimeConverter();
+ MockFacesContext context = new MockFacesContext();
+ MockUIComponent component = MockUtils.buildMockUIComponent();
+ String inputValue = "6/4/1600";
+ String secondaryPattern = "MM/d/yyyy";
+
+ dtConv.setLocale(Locale.US);
+ dtConv.setDateStyle("Let us unset it ");
+ dtConv.setType("Let us un set it");
+ dtConv.setSecondaryPattern(secondaryPattern);
+ // This should work fine
+ Date dt = (Date) dtConv.getAsObject(context, component, inputValue);
+ assertEquals(true, isEqual(date, dt));
+
+ try
+ {
+ dtConv.getAsString(context, component, dt);
+ fail("Use of secondary pattern in the above fashion is expected to fail here");
+ }
+ catch (RuntimeException ce)
+ {
+ // Just proceed . This is the expected state
+ }
+
+ dtConv.setDateStyle("shortish");
+ dtConv.setType("date");
+
+ // now we set date and type so this is expected to work fine.
+
+ String expectedOut = dtConv.getAsString(context, component, date);
+ assertEquals(inputValue, expectedOut);
+
+ context.verify();
+ component.verify();
+ }
+
+ public void testLeniencyOnPrimaryPattern()
+ {
+ String primaryPattern = "MMM/d/yyyy";
+ String secondaryPattern = null;
+ dotestLeniencyOnPattern(primaryPattern, secondaryPattern);
+ }
+
+ public void testLeniencyOnSecondaryPattern()
+ {
+ String primaryPattern = null;
+ String secondaryPattern = "MMM/d/yyyy";
+ dotestLeniencyOnPattern(primaryPattern, secondaryPattern);
+ }
+
+ private void _setupFacesContext(MockFacesContext context, int count)
+ {
+ UIViewRoot uiRoot = new UIViewRoot();
+ uiRoot.setLocale(Locale.ENGLISH);
+
+ for (int j = 0; j < count; j++)
+ context.setupGetViewRoot(uiRoot);
+ }
+
+ protected void dotestLeniencyOnPattern(
+ String primaryPattern,
+ String secondaryPatttern
+ )
+ {
+ // inputs such as 6/7/2004 is also valid. Avoiding it since - equality
+ // of the output is also compared.
+
+ // Each of these inputs ends up causing the MessageFactory to grab the
+ // label from the component a different number of times, so the number of
+ // iterations to set the component up for is difficult to figure. The
+ // numbers after the input string are the number of iterations of
+ // getAttribute that we need to set up for.
+ String[] validInputs =
+ {
+ "Jun/4/2004" /* 0 */, "Jun-4-2004" /* 10 */, "Jun.4.2004" /* 8 */,
+ "06/4/2004" /* 4 */, "06-04-2004" /* 12 */, "06.04.2004" /* 2 */,
+ "6/4/2004" /* 4 */, "6-4-2004" /* 12 */, "6.4.2004" /* 2 */
+ };
+
+ int iterations = (0 + 10 + 8 + 4 + 12 + 2 + 4 + 12 + 2);
+ GregorianCalendar cal = new GregorianCalendar(2004, Calendar.JUNE, 4);
+ cal.setTimeZone(DEFAULT_TIME_ZONE);
+ Date dt = cal.getTime();
+ MockUIComponent component
+ = MockUtils.buildMockUIComponent(iterations);
+ for (int i = 0; i < validInputs.length; i++)
+ {
+ MockFacesContext context = new MockFacesContext();
+ DateTimeConverter
+ dtConv = (DateTimeConverter) getDateTimeConverter();
+ dtConv.setLocale(Locale.ENGLISH);
+ dtConv.setPattern(primaryPattern);
+ dtConv.setSecondaryPattern(secondaryPatttern);
+ dtConv.setTimeZone(DEFAULT_TIME_ZONE);
+ dtConv.setType("INVALID"); // make this type invalid
+
+ _setupFacesContext(context, validInputs.length * 3);
+
+ Date convDate = (Date) dtConv.getAsObject(context, component,
+ validInputs[i]);
+ assertEquals(convDate, dt);
+ context.verify();
+ component.verify();
+ }
+ }
+
+ public void testCompareDateTimeConverter()
+ {
+ Object[][] data = _getDataForPatterns();
+
+ for (int i = 0; i < data.length ; i++)
+ {
+ DateTimeConverter dtConv = new DateTimeConverter();
+ dtConv.setPattern((String)data[i][0]);
+ dtConv.setLocale((Locale)data[i][2]);
+ dtConv.setTimeZone((TimeZone)data[i][3]);
+ String inputValue = (String)data[i][1];
+
+ javax.faces.convert.DateTimeConverter fdtConv
+ = new javax.faces.convert.DateTimeConverter();
+ fdtConv.setPattern((String)data[i][0]);
+ fdtConv.setLocale((Locale)data[i][2]);
+ fdtConv.setTimeZone((TimeZone)data[i][3]);
+
+ MockFacesContext context = new MockFacesContext();
+ _setupFacesContext(context, 4);
+ MockUIComponent component = MockUtils.buildMockUIComponent();
+ Date dtConvDate = (Date)dtConv.getAsObject(context, component, inputValue);
+ Date fdtConvDate = (Date)fdtConv.getAsObject(context, component, inputValue);
+ // assertEquals(dtConvDate, fdtConvDate);
+
+ String dtConvPattern = dtConv.getAsString(context, component, dtConvDate);
+ String fdtConvPattern = fdtConv.getAsString(context, component, dtConvDate);
+ // assertEquals(dtConvPattern, fdtConvPattern);
+ }
+ }
+
+ protected javax.faces.convert.DateTimeConverter getDateTimeConverter()
+ {
+ return new DateTimeConverter();
+ }
+
+ protected void setSecondaryPattern(
+ javax.faces.convert.DateTimeConverter converter,
+ String secondaryPattern
+ )
+ {
+ ((DateTimeConverter)converter).setSecondaryPattern(secondaryPattern);
+ }
+
+ protected void doTestStateHolderSaveRestore(
+ Converter conv1,
+ Converter conv2,
+ MockFacesContext context,
+ MockUIComponent component
+ )
+ {
+ super.doTestStateHolderSaveRestore(conv1, conv2, context, component);
+ }
+
+ public void testCustomMessageIsSet()
+ {
+ //default is shortish - M/d/yyyy
+ //default time is short hh:m A.M/P.M
+ //default both
+ //let us choose pattern as M/d/yyyy
+ String[] failingValues = {"15/2/2002", "02;30 A.M,", "15/2/2002 22:22 A*M.", "M/d/yyyy"};
+ String[] types = {"date", "time", "both", "pattern"};
+ String[] customMessage = {"date", "time", "both", "pattern"};
+
+ for (int i = 0; i < failingValues.length ; i++)
+ {
+ MockFacesContext context = new MockFacesContext();
+ MockUIComponent component = MockUtils.buildMockUIComponent(3 * 4);
+
+ org.apache.myfaces.adf.convert.DateTimeConverter converter =
+ new org.apache.myfaces.adf.convert.DateTimeConverter();
+
+ UIViewRoot root = new UIViewRoot();
+ root.setLocale(Locale.US);
+
+ for (int j = 0; j < 3; j++)
+ {
+ for (int k = 0; k < 4; k++)
+ context.setupGetViewRoot(root);
+ }
+
+ try
+ {
+ // ADF Converter is not lenient.
+ converter.setConvertDateMessageDetail(customMessage[0]);
+ converter.setConvertTimeMessageDetail(customMessage[1]);
+ converter.setConvertBothMessageDetail(customMessage[2]);
+ // pattern and date type is driven using the same message.
+
+
+ if ("pattern".equals(types[i]))
+ {
+ converter.setPattern("M/d/yyyy");
+ // There is no specific messaging scheme for pattern. So use the
+ // dateMessageDetail itself for this.
+ converter.setConvertDateMessageDetail(customMessage[3]);
+ }
+ else
+ converter.setType(types[i]);
+
+ Object obj = converter.getAsObject(context, component, failingValues[i]);
+ fail("Expected converter exception");
+ }
+ catch (ConverterException ce)
+ {
+ // We expected a exception to occur
+ String msg = ce.getFacesMessage().getDetail();
+ assertEquals(msg, customMessage[i]);
+ }
+ }
+ }
+
+ protected void setUp()
+ {
+ _mafct = new MockAdfFacesContext();
+ _mafct.setTwoDigitYearStart(1950);
+ _mafct.setTimeZone(DEFAULT_TIME_ZONE);
+ }
+
+ protected void tearDown()
+ {
+ _mafct.release();
+ _mafct = null;
+ }
+
+ private Object[][] _getDataForPatterns()
+ {
+ // pattern, inputvalue,locale,timezone
+ Object[][] data =
+ {
+ {"yyyy.MM.dd G 'at' HH:mm:ss z", "2001.07.04 AD at 12:08:56 PDT", Locale.US, null },
+
+ {"EEE, MMM d, ''yy","Wed, Jul 4, '01", Locale.ENGLISH, getTzone("GMT")},
+
+ {"h:mm a","12:08 PM", Locale.GERMAN, getTzone("GMT+1")},
+
+ {"hh 'o''clock' a, zzzz","12 o'clock PM, Pacific Standard Time", Locale.CANADA, getTzone("GMT-8")},
+
+ {"K:mm a, z","0:08 PM, PST", Locale.US, getTzone("PST")},
+
+ {"yyyyy.MMMMM.dd GGG hh:mm aaa","02001.July.04 AD 12:08 PM", Locale.US, null},
+ {"EEE, d MMM yyyy HH:mm:ss Z","Wed, 4 Jul 2001 12:08:56 GMT",Locale.US, getTzone("GMT")},
+ {"yyMMddHHmmss", "010704120856", Locale.ENGLISH, null, null},
+
+ };
+ return data;
+ }
+
+ private MockAdfFacesContext _mafct;
+
+ private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getDefault();
+}
+
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfNumberConverterTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfNumberConverterTest.java?rev=410407&r1=410406&r2=410407&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfNumberConverterTest.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/AdfNumberConverterTest.java Tue May 30 16:56:12 2006
@@ -50,14 +50,9 @@
protected void setUp()
{
_mafct = new MockAdfFacesContext();
- //12 attrs * 2
- for (int i = 0; i < 24; i++)
- {
- _mafct.setupGetDecimalSeparator('.');
- _mafct.setupGetNumberGroupingSeparator(',');
- _mafct.setupGetCurrencyCode(null);
- }
- _afct = getCustomMockAdfFacesContext(_mafct);
+ _mafct.setDecimalSeparator('.');
+ _mafct.setNumberGroupingSeparator(',');
+ _mafct.setCurrencyCode(null);
}
protected void tearDown()
@@ -66,17 +61,16 @@
// AdfFacesContext uses a thread local variable to hold itself and has a
// check in it. So you need to release, since all instances for tests
// are created on the same thread by Junit.
- _afct.release();
- _mafct.verify();
+ _mafct.release();
+
_mafct = null;
- _afct = null;
}
public void testCurrencyCodeIsHonoured()
{
DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.US);
- _mafct.setupGetDecimalSeparator(symbols.getMonetaryDecimalSeparator());
- _mafct.setupGetNumberGroupingSeparator(symbols.getGroupingSeparator());
+ _mafct.setDecimalSeparator(symbols.getMonetaryDecimalSeparator());
+ _mafct.setNumberGroupingSeparator(symbols.getGroupingSeparator());
super.testCurrencyCodeIsHonoured();
}
@@ -84,11 +78,9 @@
{
tearDown();
_mafct = new MockAdfFacesContext();
- _afct = super.getCustomMockAdfFacesContext(_mafct);
-
- _mafct.setupGetDecimalSeparator('*');
- _mafct.setupGetNumberGroupingSeparator('!');
- _mafct.setupGetCurrencyCode(null);
+ _mafct.setDecimalSeparator('*');
+ _mafct.setNumberGroupingSeparator('!');
+ _mafct.setCurrencyCode(null);
MockFacesContext context = new MockFacesContext();
MockUIComponent component = new MockUIComponent();
@@ -172,8 +164,6 @@
}
}
}
-
- private AdfFacesContext _afct;
private MockAdfFacesContext _mafct;
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/ConverterTestCase.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/ConverterTestCase.java?rev=410407&r1=410406&r2=410407&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/ConverterTestCase.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/convert/ConverterTestCase.java Tue May 30 16:56:12 2006
@@ -16,8 +16,6 @@
package org.apache.myfaces.adf.convert;
-import java.util.Map;
-import java.util.TimeZone;
import javax.faces.component.StateHolder;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
@@ -26,16 +24,6 @@
import junit.framework.TestCase;
-import org.apache.myfaces.adf.change.ChangeManager;
-import org.apache.myfaces.adf.config.RegionManager;
-import org.apache.myfaces.adf.context.AdfFacesContext;
-import org.apache.myfaces.adf.context.Agent;
-import org.apache.myfaces.adf.context.PageResolver;
-import org.apache.myfaces.adf.context.PageFlowScopeProvider;
-import org.apache.myfaces.adf.context.DialogService;
-import org.apache.myfaces.adf.webapp.UploadedFileProcessor;
-import org.apache.myfaces.adf.event.ReturnEvent;
-
import javax.faces.component.MockUIComponent;
import javax.faces.context.MockFacesContext;
@@ -241,178 +229,4 @@
{
return ( o1 == o2 || (o1 != null && o1.equals(o2)));
}
-
- protected AdfFacesContext getCustomMockAdfFacesContext(
- AdfFacesContext mockAdfFacesContext)
- {
- return new CustomMockAdfFacesContext(mockAdfFacesContext);
- }
-}
-
-class CustomMockAdfFacesContext extends AdfFacesContext
-{
- private AdfFacesContext _adfCtx;
-
- CustomMockAdfFacesContext(AdfFacesContext mockAdfFacesContext)
- {
- _adfCtx = mockAdfFacesContext;
- super.attach();
- }
-
- public void launchDialog(
- UIViewRoot dialogRoot,
- Map dialogParameters,
- UIComponent source,
- boolean useWindow,
- Map windowProperties)
- {
- _adfCtx.launchDialog(dialogRoot, dialogParameters, source, useWindow, windowProperties);
- }
-
-
- public PageResolver getPageResolver()
- {
- return _adfCtx.getPageResolver();
- }
-
- public PageFlowScopeProvider getPageFlowScopeProvider()
- {
- return _adfCtx.getPageFlowScopeProvider();
- }
-
- public UploadedFileProcessor getUploadedFileProcessor()
- {
- return _adfCtx.getUploadedFileProcessor();
- }
-
- public boolean isDebugOutput()
- {
- return _adfCtx.isDebugOutput();
- }
-
- public String getOutputMode()
- {
- return _adfCtx.getOutputMode();
- }
-
- public boolean isPostback()
- {
- return _adfCtx.isPostback();
- }
-
- public boolean isClientValidationDisabled()
- {
- return _adfCtx.isClientValidationDisabled();
- }
-
- public String getSkinFamily()
- {
- return _adfCtx.getSkinFamily();
- }
-
- public String getAccessibilityMode()
- {
- return _adfCtx.getAccessibilityMode();
- }
-
- public boolean isRightToLeft()
- {
- return _adfCtx.isRightToLeft();
- }
-
- public char getNumberGroupingSeparator()
- {
- return _adfCtx.getNumberGroupingSeparator();
- }
-
- public char getDecimalSeparator()
- {
- return _adfCtx.getDecimalSeparator();
- }
-
- public String getCurrencyCode()
- {
- return _adfCtx.getCurrencyCode();
- }
-
- public int getTwoDigitYearStart()
- {
- return _adfCtx.getTwoDigitYearStart();
- }
-
- public String getOracleHelpServletUrl()
- {
- return _adfCtx.getOracleHelpServletUrl();
- }
-
- public Map getHelpTopic()
- {
- return _adfCtx.getHelpTopic();
- }
-
- public Map getHelpSystem()
- {
- return _adfCtx.getHelpSystem();
- }
-
- public TimeZone getTimeZone()
- {
- return _adfCtx.getTimeZone();
- }
-
- public void addPartialTarget(UIComponent newTarget)
- {
- _adfCtx.addPartialTarget(newTarget);
- }
-
- public void addPartialTriggerListeners(UIComponent listener,
- String[] trigger)
- {
- _adfCtx.addPartialTriggerListeners(listener, trigger);
- }
-
- public void partialUpdateNotify(UIComponent updated)
- {
- _adfCtx.partialUpdateNotify(updated);
- }
-
- public Map getColorPalette()
- {
- return _adfCtx.getColorPalette();
- }
-
- public Map getFormatter()
- {
- return _adfCtx.getFormatter();
- }
-
- public Agent getAgent()
- {
- return _adfCtx.getAgent();
- }
-
- public DialogService getDialogService()
- {
- return _adfCtx.getDialogService();
- }
-
- public void returnFromDialog(Object returnValue, Map returnParam)
- {
- _adfCtx.returnFromDialog(returnValue, returnParam);
- }
- public Map getPageFlowScope()
- {
- return _adfCtx.getPageFlowScope();
- }
-
- public ChangeManager getChangeManager()
- {
- return _adfCtx.getChangeManager();
- }
-
- public RegionManager getRegionManager()
- {
- return _adfCtx.getRegionManager();
- }
-
}
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/pom.xml?rev=410407&r1=410406&r2=410407&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/pom.xml (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/pom.xml Tue May 30 16:56:12 2006
@@ -86,17 +86,6 @@
</plugin>
<plugin>
<groupId>org.apache.myfaces.adfbuild</groupId>
- <artifactId>maven-mock-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>generate-mock-sources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.myfaces.adfbuild</groupId>
<artifactId>maven-faces-plugin</artifactId>
<configuration>
<taglibs>
@@ -198,11 +187,10 @@
<dependency>
<groupId>org.apache.myfaces.adf</groupId>
<artifactId>adf-faces-api</artifactId>
- <version>${project.version}</version>
- <classifier>mock</classifier>
+ <type>test-jar</type>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Modified: incubator/adffaces/trunk/adf-faces/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/pom.xml?rev=410407&r1=410406&r2=410407&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/pom.xml (original)
+++ incubator/adffaces/trunk/adf-faces/pom.xml Tue May 30 16:56:12 2006
@@ -246,29 +246,30 @@
<dependency>
<groupId>org.apache.myfaces.adf</groupId>
<artifactId>adf-faces-build</artifactId>
- <version>11-m7-SNAPSHOT</version>
+ <version>incubator-m1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.myfaces.adf</groupId>
<artifactId>adf-faces-api</artifactId>
- <version>11-m7-SNAPSHOT</version>
+ <version>incubator-m1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.adf</groupId>
- <artifactId>adf-faces-impl</artifactId>
- <version>11-m7-SNAPSHOT</version>
+ <artifactId>adf-faces-api</artifactId>
+ <version>incubator-m1-SNAPSHOT</version>
+ <type>test-jar</type>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.myfaces.adf</groupId>
<artifactId>adf-faces-impl</artifactId>
- <version>11-m7-SNAPSHOT</version>
- <type>test-jar</type>
- <scope>test</scope>
+ <version>incubator-m1-SNAPSHOT</version>
</dependency>
+
<dependency>
<groupId>javax.servlet.jsp</groupId>