From c2e26751fb755b08a9c2fd7efb680d130f084cd1 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Wed, 22 Feb 2012 11:28:36 +0000
Subject: [PATCH] LMS-2774 fixing tests caused by fact that now all identifiers
 in NewSample are turned to upper case

SVN: 24528
---
 .../openbis/generic/server/business/bo/SampleBOTest.java   | 7 ++++---
 .../client/web/server/GenericClientServiceTest.java        | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java
index 92749d333f3..f3187e5d0fb 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java
@@ -81,7 +81,7 @@ public final class SampleBOTest extends AbstractBOTest
 
     private static final String MASTER_PLATE = "MASTER_PLATE";
 
-    private static final String DEFAULT_SAMPLE_CODE = "xx";
+    private static final String DEFAULT_SAMPLE_CODE = "XX";
 
     static SamplePE createSample(final String sampleCode)
     {
@@ -354,7 +354,7 @@ public final class SampleBOTest extends AbstractBOTest
             });
         ExperimentIdentifier experimentIdentifier = null;
         String errorMsg =
-                "Cannot detach the sample 'xx' from the experiment because there are already datasets attached to the sample.";
+                "Cannot detach the sample 'XX' from the experiment because there are already datasets attached to the sample.";
         try
         {
             updateSampleExperiment(SAMPLE_TECH_ID, sample, experimentIdentifier);
@@ -981,7 +981,8 @@ public final class SampleBOTest extends AbstractBOTest
             {
                 {
                     one(propertiesConverter).updateProperties(sample.getProperties(),
-                            sample.getSampleType(), null, EXAMPLE_PERSON, Collections.<String>emptySet());
+                            sample.getSampleType(), null, EXAMPLE_PERSON,
+                            Collections.<String> emptySet());
                 }
             });
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java
index 9d13c11873e..6eb7b23f3e8 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java
@@ -219,7 +219,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest
     {
         final String sessionKey = "some-session-key";
         final NewSample newSample =
-                createNewSample("/group1/sample1", "MASTER_PLATE", IEntityProperty.EMPTY_ARRAY);
+                createNewSample("/SPACE1/SAMPLE1", "MASTER_PLATE", IEntityProperty.EMPTY_ARRAY);
         context.checking(new Expectations()
             {
                 {
@@ -236,7 +236,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest
                             {
                                 final NewSample sample = (NewSample) invocation.getParameter(1);
                                 assertEquals("MASTER_PLATE", sample.getSampleType().getCode());
-                                assertEquals("/group1/sample1", sample.getIdentifier());
+                                assertEquals("/SPACE1/SAMPLE1", sample.getIdentifier());
                                 final Collection<NewAttachment> attachments =
                                         (Collection<NewAttachment>) invocation.getParameter(2);
                                 assertEquals(0, attachments.size());
-- 
GitLab