]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5564: Fixed UTF-8 Update test for Article service.
authorRichard Millet <richard.millet@berkeley.edu>
Sun, 20 Jan 2013 05:04:42 +0000 (21:04 -0800)
committerRichard Millet <richard.millet@berkeley.edu>
Sun, 20 Jan 2013 05:04:42 +0000 (21:04 -0800)
.gitignore
services/article/client/src/test/java/org/collectionspace/services/client/test/ArticleServiceTest.java
services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java

index 6224def2606ab10fafa5311a90d1816fd7258cff..a98863c2d836b1cfe5a3f2a420b7d21edb8a67a8 100644 (file)
@@ -1,4 +1,28 @@
 3rdparty/nuxeo/nuxeo-platform-listener/.project
+services/article/service/.project
+services/article/service/.settings/
+3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/.classpath
+3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/.project
+3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/.settings/
+3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/.classpath
+3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/.project
+3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/.settings/
+services/article/.project
+services/article/.settings/
+services/article/3rdparty/.project
+services/article/3rdparty/.settings/
+services/article/3rdparty/nuxeo-platform-cs-article/.classpath
+services/article/3rdparty/nuxeo-platform-cs-article/.project
+services/article/3rdparty/nuxeo-platform-cs-article/.settings/
+services/article/client/.classpath
+services/article/client/.project
+services/article/client/.settings/
+services/article/client/src/test/resources/
+services/article/jaxb/.classpath
+services/article/jaxb/.project
+services/article/jaxb/.settings/
+services/article/service/.classpath
+services/article/service/.project3rdparty/nuxeo/nuxeo-platform-listener/.project
 3rdparty/nuxeo/nuxeo-platform-listener/.settings/
 services/JaxRsServiceProvider/.settings/.jsdtscope
 *org.eclipse.wst*
index e7861f0c41003755f11570ae9784faab49bfbde9..5d4cc35ff90d39956dae62e0c6c532799f2b5454 100644 (file)
@@ -401,10 +401,9 @@ public class ArticleServiceTest extends
                                        + "\n" + "UTF-8 data received="
                                        + updatedArticleCommon.getArticleJobId());
                }
-               Assert.assertTrue(
-                               updatedArticleCommon.getArticleJobId().contains(
+               Assert.assertTrue(updatedArticleCommon.getArticleSource().contains(
                                                getUTF8DataFragment()), "UTF-8 data retrieved '"
-                                               + updatedArticleCommon.getArticleJobId()
+                                               + updatedArticleCommon.getArticleSource()
                                                + "' does not contain expected data '"
                                                + getUTF8DataFragment());
                Assert.assertEquals(updatedArticleCommon.getArticleJobId(),
@@ -604,6 +603,8 @@ public class ArticleServiceTest extends
                ArticlesCommon articlesCommon = new ArticlesCommon();
                articlesCommon.setArticleNumber(articleNumber);
                articlesCommon.setArticleJobId(articleJobId);
+               articlesCommon.setArticleSource(getUTF8DataFragment());
+
 
                PoxPayloadOut multipart = new PoxPayloadOut(
                                this.getServicePathComponent());
index 111123a7212a7d27772ddddb44f03ec6531f75bc..df589de7a20b2df43cd5efff8bb2475f32df38fd 100644 (file)
@@ -6,6 +6,8 @@ package org.collectionspace.services.common;
 import java.io.File;\r
 import java.io.FileInputStream;\r
 import java.io.FileNotFoundException;\r
+import java.io.FileOutputStream;\r
+import java.io.IOException;\r
 import java.io.InputStream;\r
 import java.sql.Connection;\r
 import java.sql.PreparedStatement;\r
@@ -666,6 +668,22 @@ public class ServiceMain {
                        serverRootDir +\r
                        "\" instead.");\r
         }\r
+        \r
+        if (logger.isErrorEnabled() == true) {\r
+               System.out.println("+++ server root directory is: " + serverRootDir);\r
+               try {\r
+                               FileOutputStream appLayerRootHello = new FileOutputStream(serverRootDir + "webapps\\collectionspace\\hello");\r
+                               try {\r
+                                       appLayerRootHello.write("Hello?".getBytes());\r
+                               } catch (IOException e) {\r
+                                       // TODO Auto-generated catch block\r
+                                       e.printStackTrace();\r
+                               }\r
+                       } catch (FileNotFoundException e) {\r
+                               // TODO Auto-generated catch block\r
+                               e.printStackTrace();\r
+                       }\r
+        }\r
     }\r
 \r
 \r