From: Richard Millet Date: Sun, 20 Jan 2013 05:04:42 +0000 (-0800) Subject: CSPACE-5564: Fixed UTF-8 Update test for Article service. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=5f3b084675b5f0becf781e02408bc8b7b6eb8455;p=tmp%2Fjakarta-migration.git CSPACE-5564: Fixed UTF-8 Update test for Article service. --- diff --git a/.gitignore b/.gitignore index 6224def26..a98863c2d 100644 --- a/.gitignore +++ b/.gitignore @@ -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* diff --git a/services/article/client/src/test/java/org/collectionspace/services/client/test/ArticleServiceTest.java b/services/article/client/src/test/java/org/collectionspace/services/client/test/ArticleServiceTest.java index e7861f0c4..5d4cc35ff 100644 --- a/services/article/client/src/test/java/org/collectionspace/services/client/test/ArticleServiceTest.java +++ b/services/article/client/src/test/java/org/collectionspace/services/client/test/ArticleServiceTest.java @@ -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()); diff --git a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java index 111123a72..df589de7a 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java +++ b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java @@ -6,6 +6,8 @@ package org.collectionspace.services.common; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.PreparedStatement; @@ -666,6 +668,22 @@ public class ServiceMain { serverRootDir + "\" instead."); } + + if (logger.isErrorEnabled() == true) { + System.out.println("+++ server root directory is: " + serverRootDir); + try { + FileOutputStream appLayerRootHello = new FileOutputStream(serverRootDir + "webapps\\collectionspace\\hello"); + try { + appLayerRootHello.write("Hello?".getBytes()); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } }