|
From: <be...@us...> - 2010-03-12 20:59:19
|
Revision: 297
http://objectlabkit.svn.sourceforge.net/objectlabkit/?rev=297&view=rev
Author: benoitx
Date: 2010-03-12 20:59:12 +0000 (Fri, 12 Mar 2010)
Log Message:
-----------
Added a profile "perf-testing" for performance testing.
Can be launched by "mvn install -P perf-testing" which will run all tests, including performance.
Modified Paths:
--------------
trunk/datecalc-jdk/pom.xml
trunk/datecalc-joda/pom.xml
Added Paths:
-----------
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkCalendarPerformanceCalculatorTest.java
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkDatePerformanceCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/LocalDatePerformanceCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/YearMonthDayPerformanceCalculatorTest.java
Removed Paths:
-------------
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPerformanceCalculatorTest.java
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePerformanceCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePerformanceCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPerformanceCalculatorTest.java
Modified: trunk/datecalc-jdk/pom.xml
===================================================================
--- trunk/datecalc-jdk/pom.xml 2010-03-11 19:40:51 UTC (rev 296)
+++ trunk/datecalc-jdk/pom.xml 2010-03-12 20:59:12 UTC (rev 297)
@@ -1,101 +1,169 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
- <artifactId>datecalc-jdk</artifactId>
- <packaging>bundle</packaging>
+ <artifactId>datecalc-jdk</artifactId>
+ <packaging>bundle</packaging>
- <name>Date Calculator for JDK</name>
- <description>Date Calculator methods for JDK</description>
+ <name>Date Calculator for JDK</name>
+ <description>Date Calculator methods for JDK</description>
- <dependencies>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- </dependency>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- <scope>test</scope>
- <classifier>tests</classifier>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ <scope>test</scope>
+ <classifier>tests</classifier>
+ </dependency>
+ </dependencies>
- <build>
- <plugins>
- <plugin> <!-- (2) OSGi START -->
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Export-Package>net.objectlab.kit.datecalc.*;version="${pom.version}"</Export-Package>
- <Private-Package />
- <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
- <Bundle-Version>${pom.version}</Bundle-Version>
- <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
+ <build>
+ <plugins>
+ <!-- UNIT tests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <excludes>
+ <exclude>**/perf/**</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- <!--<Private-Package>com.my.company.*</Private-Package>-->
- <!--<Bundle-Activator>com.my.company.Activator</Bundle-Activator>-->
- </instructions>
- </configuration>
- </plugin> <!-- (2) END -->
- </plugins>
- </build>
+ <plugin> <!-- (2) OSGi START -->
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>net.objectlab.kit.datecalc.*;version="${pom.version}"</Export-Package>
+ <Private-Package />
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Bundle-Version>${pom.version}</Bundle-Version>
+ <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <configLocation>config/maven_checks.xml</configLocation>
- </configuration>
- </plugin>
+ <!--<Private-Package>com.my.company.*</Private-Package>-->
+ <!--<Bundle-Activator>com.my.company.Activator</Bundle-Activator>-->
+ </instructions>
+ </configuration>
+ </plugin> <!-- (2) END -->
+ </plugins>
+ </build>
- <!--
- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> </plugin> <plugin>
- <artifactId>maven-javadoc-plugin</artifactId> <configuration> <aggregate>true</aggregate> </configuration> </plugin> <plugin>
- <groupId>org.codehaus.mojo</groupId> <artifactId>jxr-maven-plugin</artifactId> </plugin>
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-clover-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <targetJdk>1.5</targetJdk>
- <rulesets>
- <ruleset>/rulesets/basic.xml</ruleset>
- <ruleset>/rulesets/controversial.xml</ruleset>
- </rulesets>
- <linkXref>true</linkXref>
- <minimumTokens>100</minimumTokens>
- </configuration>
- </plugin>
- <!--
- <plugin> <artifactId>maven-changes-plugin</artifactId> <configuration>
- <issueLinkTemplate>%URL%/?func=detail&group_id=175139&%ISSUE%</issueLinkTemplate> </configuration> </plugin> <plugin>
- <artifactId>maven-changelog-plugin</artifactId> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId>
- <artifactId>dashboard-maven-plugin</artifactId> </plugin> <plugin> <groupId>net.sf</groupId> <artifactId>stat-scm</artifactId>
- </plugin>
- -->
- </plugins>
- </reporting>
+ <profiles>
+ <profile>
+ <id>perf-testing</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-perf</id>
+ <!-- use it mvn integration-test -P integration-test -->
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <argLine>-Xms256m -Xmx1024m</argLine>
+ <skip>false</skip>
+ <includes>
+ <include>**/perf/*Test.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>config/maven_checks.xml</configLocation>
+ </configuration>
+ </plugin>
+
+ <!--
+ <plugin> <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId> </plugin>
+ <plugin> <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration> <aggregate>true</aggregate> </configuration>
+ </plugin> <plugin> <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jxr-maven-plugin</artifactId> </plugin>
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clover-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <targetJdk>1.5</targetJdk>
+ <rulesets>
+ <ruleset>/rulesets/basic.xml</ruleset>
+ <ruleset>/rulesets/controversial.xml</ruleset>
+ </rulesets>
+ <linkXref>true</linkXref>
+ <minimumTokens>100</minimumTokens>
+ </configuration>
+ </plugin>
+ <!--
+ <plugin> <artifactId>maven-changes-plugin</artifactId>
+ <configuration>
+ <issueLinkTemplate>%URL%/?func=detail&group_id=175139&%ISSUE%</issueLinkTemplate>
+ </configuration> </plugin> <plugin>
+ <artifactId>maven-changelog-plugin</artifactId> </plugin> <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>dashboard-maven-plugin</artifactId> </plugin> <plugin>
+ <groupId>net.sf</groupId> <artifactId>stat-scm</artifactId>
+ </plugin>
+ -->
+ </plugins>
+ </reporting>
</project>
\ No newline at end of file
Deleted: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPerformanceCalculatorTest.java 2010-03-11 19:40:51 UTC (rev 296)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -1,70 +0,0 @@
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- *
- * $Id: JdkCalendarForwardDateCalculatorTest.java 203 2006-10-11 12:53:07Z benoitx $
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package net.objectlab.kit.datecalc.jdk;
-
-import java.util.Calendar;
-
-import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
-import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
-import net.objectlab.kit.datecalc.common.Utils;
-
-public class JdkCalendarPerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<Calendar> {
-
- @Override
- protected Calendar newDate(final String date) {
- return Utils.createCalendar(date);
- }
-
- @Override
- protected KitCalculatorsFactory<Calendar> getDateCalculatorFactory() {
- return CalendarKitCalculatorsFactory.getDefaultInstance();
- }
-
-}
-
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- */
Deleted: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePerformanceCalculatorTest.java 2010-03-11 19:40:51 UTC (rev 296)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -1,69 +0,0 @@
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- *
- * $Id: JdkDateForwardDateCalculatorTest.java 224 2006-11-24 16:02:47Z marchy $
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package net.objectlab.kit.datecalc.jdk;
-
-import java.util.Date;
-
-import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
-import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
-import net.objectlab.kit.datecalc.common.Utils;
-
-public class JdkDatePerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<Date> {
-
- @Override
- protected Date newDate(final String date) {
- return Utils.createDate(date);
- }
-
- @Override
- protected KitCalculatorsFactory getDateCalculatorFactory() {
- return DateKitCalculatorsFactory.getDefaultInstance();
- }
-}
-
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- */
Added: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkCalendarPerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkCalendarPerformanceCalculatorTest.java (rev 0)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkCalendarPerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -0,0 +1,71 @@
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ *
+ * $Id: JdkCalendarForwardDateCalculatorTest.java 203 2006-10-11 12:53:07Z benoitx $
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package net.objectlab.kit.datecalc.jdk.perf;
+
+import java.util.Calendar;
+
+import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
+import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
+import net.objectlab.kit.datecalc.common.Utils;
+import net.objectlab.kit.datecalc.jdk.CalendarKitCalculatorsFactory;
+
+public class JdkCalendarPerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<Calendar> {
+
+ @Override
+ protected Calendar newDate(final String date) {
+ return Utils.createCalendar(date);
+ }
+
+ @Override
+ protected KitCalculatorsFactory<Calendar> getDateCalculatorFactory() {
+ return CalendarKitCalculatorsFactory.getDefaultInstance();
+ }
+
+}
+
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ */
Added: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkDatePerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkDatePerformanceCalculatorTest.java (rev 0)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/perf/JdkDatePerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -0,0 +1,70 @@
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ *
+ * $Id: JdkDateForwardDateCalculatorTest.java 224 2006-11-24 16:02:47Z marchy $
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package net.objectlab.kit.datecalc.jdk.perf;
+
+import java.util.Date;
+
+import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
+import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
+import net.objectlab.kit.datecalc.common.Utils;
+import net.objectlab.kit.datecalc.jdk.DateKitCalculatorsFactory;
+
+public class JdkDatePerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<Date> {
+
+ @Override
+ protected Date newDate(final String date) {
+ return Utils.createDate(date);
+ }
+
+ @Override
+ protected KitCalculatorsFactory getDateCalculatorFactory() {
+ return DateKitCalculatorsFactory.getDefaultInstance();
+ }
+}
+
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ */
Modified: trunk/datecalc-joda/pom.xml
===================================================================
--- trunk/datecalc-joda/pom.xml 2010-03-11 19:40:51 UTC (rev 296)
+++ trunk/datecalc-joda/pom.xml 2010-03-12 20:59:12 UTC (rev 297)
@@ -1,106 +1,175 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
- <artifactId>datecalc-joda</artifactId>
- <packaging>bundle</packaging>
+ <artifactId>datecalc-joda</artifactId>
+ <packaging>bundle</packaging>
- <name>Date Calculator for Joda</name>
- <description>Date Calculator methods for Joda</description>
+ <name>Date Calculator for Joda</name>
+ <description>Date Calculator methods for Joda</description>
- <dependencies>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>1.6</version>
- </dependency>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- <scope>test</scope>
- <classifier>tests</classifier>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ <scope>test</scope>
+ <classifier>tests</classifier>
+ </dependency>
+ </dependencies>
- <build>
- <plugins>
- <plugin> <!-- (2) OSGi START -->
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Export-Package>net.objectlab.kit.datecalc.*;version="${pom.version}"</Export-Package>
- <Private-Package />
- <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
- <Bundle-Version>${pom.version}</Bundle-Version>
- <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
+ <build>
+ <plugins>
+ <!-- UNIT tests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <excludes>
+ <exclude>**/perf/**</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- <!--<Private-Package>com.my.company.*</Private-Package>-->
- <!--<Bundle-Activator>com.my.company.Activator</Bundle-Activator>-->
- </instructions>
- </configuration>
- </plugin> <!-- (2) END -->
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <configLocation>config/maven_checks.xml</configLocation>
- </configuration>
- </plugin>
+ <plugin> <!-- (2) OSGi START -->
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>net.objectlab.kit.datecalc.*;version="${pom.version}"</Export-Package>
+ <Private-Package />
+ <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Bundle-Version>${pom.version}</Bundle-Version>
+ <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
- <!--
- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> </plugin> <plugin>
- <artifactId>maven-javadoc-plugin</artifactId> <configuration> <aggregate>true</aggregate> </configuration> </plugin> <plugin>
- <groupId>org.codehaus.mojo</groupId> <artifactId>jxr-maven-plugin</artifactId> </plugin>
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-clover-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <targetJdk>1.5</targetJdk>
- <rulesets>
- <ruleset>/rulesets/basic.xml</ruleset>
- <ruleset>/rulesets/controversial.xml</ruleset>
- </rulesets>
- <linkXref>true</linkXref>
- <minimumTokens>100</minimumTokens>
- </configuration>
- </plugin>
- <!--
- <plugin> <artifactId>maven-changes-plugin</artifactId> <configuration>
- <issueLinkTemplate>%URL%/?func=detail&group_id=175139&%ISSUE%</issueLinkTemplate> </configuration> </plugin> <plugin>
- <artifactId>maven-changelog-plugin</artifactId> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId>
- <artifactId>dashboard-maven-plugin</artifactId> </plugin> <plugin> <groupId>net.sf</groupId> <artifactId>stat-scm</artifactId>
- </plugin>
- -->
- </plugins>
- </reporting>
+ <!--<Private-Package>com.my.company.*</Private-Package>-->
+ <!--<Bundle-Activator>com.my.company.Activator</Bundle-Activator>-->
+ </instructions>
+ </configuration>
+ </plugin> <!-- (2) END -->
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>perf-testing</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-perf</id>
+ <!-- use it mvn integration-test -P integration-test -->
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <argLine>-Xms256m -Xmx1024m</argLine>
+ <skip>false</skip>
+ <includes>
+ <include>**/perf/*Test.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>config/maven_checks.xml</configLocation>
+ </configuration>
+ </plugin>
+
+ <!--
+ <plugin> <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId> </plugin>
+ <plugin> <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration> <aggregate>true</aggregate> </configuration>
+ </plugin> <plugin> <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jxr-maven-plugin</artifactId> </plugin>
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clover-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <targetJdk>1.5</targetJdk>
+ <rulesets>
+ <ruleset>/rulesets/basic.xml</ruleset>
+ <ruleset>/rulesets/controversial.xml</ruleset>
+ </rulesets>
+ <linkXref>true</linkXref>
+ <minimumTokens>100</minimumTokens>
+ </configuration>
+ </plugin>
+ <!--
+ <plugin> <artifactId>maven-changes-plugin</artifactId>
+ <configuration>
+ <issueLinkTemplate>%URL%/?func=detail&group_id=175139&%ISSUE%</issueLinkTemplate>
+ </configuration> </plugin> <plugin>
+ <artifactId>maven-changelog-plugin</artifactId> </plugin> <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>dashboard-maven-plugin</artifactId> </plugin> <plugin>
+ <groupId>net.sf</groupId> <artifactId>stat-scm</artifactId>
+ </plugin>
+ -->
+ </plugins>
+ </reporting>
+
</project>
\ No newline at end of file
Deleted: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePerformanceCalculatorTest.java 2010-03-11 19:40:51 UTC (rev 296)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -1,82 +0,0 @@
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- *
- * $Id: LocalDateForwardDateCalculatorTest.java 203 2006-10-11 12:53:07Z benoitx $
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package net.objectlab.kit.datecalc.joda;
-
-import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
-import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
-import net.objectlab.kit.datecalc.common.WorkingWeek;
-
-import org.joda.time.LocalDate;
-
-public class LocalDatePerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<LocalDate> {
-
-// public LocalDateForwardDateCalculatorTest() {
-// super();
-// }
-//
-// public LocalDateForwardDateCalculatorTest(final java.lang.String name) {
-// super(name);
-// }
-
- @Override
- protected LocalDate newDate(final String date) {
- return new LocalDate(date);
- }
-
- @Override
- protected WorkingWeek getWorkingWeek(final WorkingWeek ww) {
- return new JodaWorkingWeek(ww);
- }
-
- @Override
- protected KitCalculatorsFactory<LocalDate> getDateCalculatorFactory() {
- return LocalDateKitCalculatorsFactory.getDefaultInstance();
- }
-}
-
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- */
Deleted: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPerformanceCalculatorTest.java 2010-03-11 19:40:51 UTC (rev 296)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -1,80 +0,0 @@
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- *
- * $Id: YearMonthDayForwardDateCalculatorTest.java 235 2007-01-04 18:31:58Z benoitx $
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package net.objectlab.kit.datecalc.joda;
-
-import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
-import net.objectlab.kit.datecalc.common.HolidayCalendar;
-import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
-import net.objectlab.kit.datecalc.common.WorkingWeek;
-
-import org.joda.time.YearMonthDay;
-
-public class YearMonthDayPerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<YearMonthDay> {
-
- @Override
- protected YearMonthDay newDate(final String date) {
- return new YearMonthDay(date);
- }
-
- @Override
- protected void registerHolidays(final String name, final HolidayCalendar<YearMonthDay> holidays) {
- YearMonthDayKitCalculatorsFactory.getDefaultInstance().registerHolidays(name, holidays);
- }
-
- @Override
- protected WorkingWeek getWorkingWeek(final WorkingWeek ww) {
- return new JodaWorkingWeek(ww);
- }
-
- @Override
- protected KitCalculatorsFactory<YearMonthDay> getDateCalculatorFactory() {
- return YearMonthDayKitCalculatorsFactory.getDefaultInstance();
- }
-}
-
-/*
- * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
- *
- * Based in London, we are world leaders in the design and development
- * of bespoke applications for the securities financing markets.
- *
- * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
- * ___ _ _ _ _ _
- * / _ \| |__ (_) ___ ___| |_| | __ _| |__
- * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
- * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
- * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
- * |__/
- *
- * www.ObjectLab.co.uk
- */
Added: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/LocalDatePerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/LocalDatePerformanceCalculatorTest.java (rev 0)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/LocalDatePerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -0,0 +1,76 @@
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ *
+ * $Id: LocalDateForwardDateCalculatorTest.java 203 2006-10-11 12:53:07Z benoitx $
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package net.objectlab.kit.datecalc.joda.perf;
+
+import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
+import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
+import net.objectlab.kit.datecalc.common.WorkingWeek;
+import net.objectlab.kit.datecalc.joda.LocalDateKitCalculatorsFactory;
+import net.objectlab.kit.datecalc.joda.JodaWorkingWeek;
+
+import org.joda.time.LocalDate;
+
+public class LocalDatePerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<LocalDate> {
+
+ @Override
+ protected LocalDate newDate(final String date) {
+ return new LocalDate(date);
+ }
+
+ @Override
+ protected WorkingWeek getWorkingWeek(final WorkingWeek ww) {
+ return new JodaWorkingWeek(ww);
+ }
+
+ @Override
+ protected KitCalculatorsFactory<LocalDate> getDateCalculatorFactory() {
+ return LocalDateKitCalculatorsFactory.getDefaultInstance();
+ }
+}
+
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ */
Added: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/YearMonthDayPerformanceCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/YearMonthDayPerformanceCalculatorTest.java (rev 0)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/perf/YearMonthDayPerformanceCalculatorTest.java 2010-03-12 20:59:12 UTC (rev 297)
@@ -0,0 +1,82 @@
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ *
+ * $Id: YearMonthDayForwardDateCalculatorTest.java 235 2007-01-04 18:31:58Z benoitx $
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package net.objectlab.kit.datecalc.joda.perf;
+
+import net.objectlab.kit.datecalc.common.AbstractPerformanceDateCalculatorTest;
+import net.objectlab.kit.datecalc.common.HolidayCalendar;
+import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
+import net.objectlab.kit.datecalc.common.WorkingWeek;
+import net.objectlab.kit.datecalc.joda.JodaWorkingWeek;
+import net.objectlab.kit.datecalc.joda.YearMonthDayKitCalculatorsFactory;
+
+import org.joda.time.YearMonthDay;
+
+public class YearMonthDayPerformanceCalculatorTest extends AbstractPerformanceDateCalculatorTest<YearMonthDay> {
+
+ @Override
+ protected YearMonthDay newDate(final String date) {
+ return new YearMonthDay(date);
+ }
+
+ @Override
+ protected void registerHolidays(final String name, final HolidayCalendar<YearMonthDay> holidays) {
+ YearMonthDayKitCalculatorsFactory.getDefaultInstance().registerHolidays(name, holidays);
+ }
+
+ @Override
+ protected WorkingWeek getWorkingWeek(final WorkingWeek ww) {
+ return new JodaWorkingWeek(ww);
+ }
+
+ @Override
+ protected KitCalculatorsFactory<YearMonthDay> getDateCalculatorFactory() {
+ return YearMonthDayKitCalculatorsFactory.getDefaultInstance();
+ }
+}
+
+/*
+ * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
+ *
+ * Based in London, we are world leaders in the design and development
+ * of bespoke applications for the securities financing markets.
+ *
+ * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
+ * ___ _ _ _ _ _
+ * / _ \| |__ (_) ___ ___| |_| | __ _| |__
+ * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \
+ * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) |
+ * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
+ * |__/
+ *
+ * www.ObjectLab.co.uk
+ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|