From do-not-reply at jboss.org Thu Aug 26 11:30:32 2010
Content-Type: multipart/mixed; boundary="===============4971534936025548601=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: exo-jcr-commits at lists.jboss.org
Subject: [exo-jcr-commits] exo-jcr SVN: r2995 - in
jcr/trunk/exo.jcr.component.ftp/src/test:
java/org/exoplatform/services/ftp/usecases and 1 other directories.
Date: Thu, 26 Aug 2010 11:30:32 -0400
Message-ID: <201008261530.o7QFUW4X026927@svn01.web.mwc.hst.phx2.redhat.com>
--===============4971534936025548601==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: sergiykarpenko
Date: 2010-08-26 11:30:31 -0400 (Thu, 26 Aug 2010)
New Revision: 2995
Added:
jcr/trunk/exo.jcr.component.ftp/src/test/java/org/exoplatform/services/f=
tp/usecases/
jcr/trunk/exo.jcr.component.ftp/src/test/java/org/exoplatform/services/f=
tp/usecases/TestCopyBetweenWorkspaces.java
Modified:
jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone/test-=
jcr-config.xml
Log:
EXOJCR-849: test created
Added: jcr/trunk/exo.jcr.component.ftp/src/test/java/org/exoplatform/servic=
es/ftp/usecases/TestCopyBetweenWorkspaces.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/exo.jcr.component.ftp/src/test/java/org/exoplatform/services/=
ftp/usecases/TestCopyBetweenWorkspaces.java (rev 0)
+++ jcr/trunk/exo.jcr.component.ftp/src/test/java/org/exoplatform/services/=
ftp/usecases/TestCopyBetweenWorkspaces.java 2010-08-26 15:30:31 UTC (rev 29=
95)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see.
+ */
+package org.exoplatform.services.ftp.usecases;
+
+import org.exoplatform.services.ftp.BaseFtpTest;
+import org.exoplatform.services.ftp.FtpConst;
+
+/**
+ * Created by The eXo Platform SAS.
+ * =
+ *
Date: =
+ *
+ * @author Karpenko Sergiy =
+ * @version $Id: TestCopyBetweenWorkspaces.java 111 2008-11-11 11:11:11Z s=
erg $
+ */
+public class TestCopyBetweenWorkspaces extends BaseFtpTest
+{
+
+ public void testCopyBetweenWorkspaces() throws Exception
+ {
+ String filename =3D "testCopy.txt";
+ String fileContent =3D "exo ftp test copy server test\n";
+ try
+ {
+ connect();
+ pwd();
+ cwd("ws");
+ pwd();
+ stor(fileContent.getBytes(), filename);
+ String retrieved =3D new String(retr(filename));
+ assertEquals(fileContent, retrieved);
+
+ // make move
+ sendCommand(FtpConst.Commands.CMD_RNFR + ' ' + filename);
+ String response =3D readResponse();
+ assertTrue("Must start with 350, but was [" + response + "]", res=
ponse.startsWith("350 "));
+ sendCommand(FtpConst.Commands.CMD_RNTO + ' ' + "/ws2/" + filename=
);
+ response =3D readResponse();
+ assertTrue("Must start with 250, but was [" + response + "]", res=
ponse.startsWith("250 "));
+
+ }
+ finally
+ {
+ disconnect();
+ }
+ }
+}
Modified: jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalon=
e/test-jcr-config.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone/test=
-jcr-config.xml 2010-08-26 14:32:29 UTC (rev 2994)
+++ jcr/trunk/exo.jcr.component.ftp/src/test/resources/conf/standalone/test=
-jcr-config.xml 2010-08-26 15:30:31 UTC (rev 2995)
@@ -32,10 +32,7 @@
-
+
@@ -50,18 +47,51 @@
-
+
900000
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 900000
+
+
+
+
+
+
+
--===============4971534936025548601==--