|
From: <tri...@us...> - 2007-12-28 23:34:52
|
Revision: 223
http://equanda.svn.sourceforge.net/equanda/?rev=223&view=rev
Author: triathlon98
Date: 2007-12-28 15:34:51 -0800 (Fri, 28 Dec 2007)
Log Message:
-----------
EQ-118 replace all "object model" by "domain model"
assure testcases rely on jboss4.2.2 and work with that version
Modified Paths:
--------------
trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/TestAdapter.java
Added Paths:
-----------
trunk/equanda-util/src/test/java/org/equanda/util/DMExtensionTest.java
Modified: trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/TestAdapter.java
===================================================================
--- trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/TestAdapter.java 2007-12-28 23:21:37 UTC (rev 222)
+++ trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/TestAdapter.java 2007-12-28 23:34:51 UTC (rev 223)
@@ -69,8 +69,8 @@
importCredentials = new ImportCredentials( login, paswd );
-// SecurityAssociation.setPrincipal( new SimplePrincipal( login ) );
-// SecurityAssociation.setCredential( paswd.toCharArray() );
+ SecurityAssociation.setPrincipal( new SimplePrincipal( login ) );
+ SecurityAssociation.setCredential( paswd.toCharArray() );
}
catch ( IOException ioe )
{
Copied: trunk/equanda-util/src/test/java/org/equanda/util/DMExtensionTest.java (from rev 222, trunk/equanda-util/src/test/java/org/equanda/util/OMExtensionTest.java)
===================================================================
--- trunk/equanda-util/src/test/java/org/equanda/util/DMExtensionTest.java (rev 0)
+++ trunk/equanda-util/src/test/java/org/equanda/util/DMExtensionTest.java 2007-12-28 23:34:51 UTC (rev 223)
@@ -0,0 +1,77 @@
+/**
+ * This file is part of the equanda project.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1 (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.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ * ANY KIND, either express or implied. See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ */
+
+package org.equanda.util;
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+
+import org.equanda.util.script.DMExtension;
+import murlen.util.fscript.FSFastExtension;
+
+public class DMExtensionTest
+ extends TestCase
+{
+ private static final String TEST_TIME1 = "2005-08-01 16:05:12.0";
+ private static final String TEST_TSTR1 = "20050801160512.000";
+ private static final String TEST_TIME2 = "2003-01-21 11:01:24.514";
+ private static final String TEST_TSTR2 = "20030121110124.514";
+ private static final String TEST_TIME3 = "2005-12-28 18:10:30.29";
+ private static final String TEST_TSTR3 = "20051228181030.290";
+ private static final String TEST_TSTR3I = "20051228181030290";
+
+ public void testBuilder()
+ throws Exception
+ {
+ DMExtension ome = new DMExtension();
+ FSFastExtension fe = new FSFastExtension();
+ ome.addExtension( fe );
+
+ ArrayList par = new ArrayList();
+ par.add( "" );
+ Object res;
+
+ par.set( 0, TEST_TSTR1 );
+ res=fe.callFunction( "DMTimestamp", par );
+ assertEquals( TEST_TIME1, res.toString());
+ par.set( 0, res );
+ res = fe.callFunction( "DMTimestamp", par );
+ assertEquals( TEST_TSTR1, res );
+
+ par.set( 0, TEST_TSTR2 );
+ res=fe.callFunction( "DMTimestamp", par );
+ assertEquals( TEST_TIME2, res.toString());
+ par.set( 0, res );
+ res = fe.callFunction( "DMTimestamp", par );
+ assertEquals( TEST_TSTR2, res );
+
+ par.set( 0, TEST_TSTR3I );
+ res=fe.callFunction( "DMTimestamp", par );
+ assertEquals( TEST_TIME3, res.toString());
+ par.set( 0, res );
+ res = fe.callFunction( "DMTimestamp", par );
+ assertEquals( TEST_TSTR3, res );
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|