From 4e3a5b2fd25be6164f142500d769aad1074e2940 Mon Sep 17 00:00:00 2001
From: Viktor Kovtun <viktor.kovtun@id.ethz.ch>
Date: Fri, 25 Sep 2020 19:01:15 +0200
Subject: [PATCH] SSDM-10151 Added
 AbstractSearchPropertyTest.testSearchWithPropertyMatchingSampleProperty().

---
 .../asapi/v3/AbstractSearchPropertyTest.java     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractSearchPropertyTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractSearchPropertyTest.java
index ba13550854e..018aa4f9353 100644
--- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractSearchPropertyTest.java
+++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractSearchPropertyTest.java
@@ -510,6 +510,22 @@ public abstract class AbstractSearchPropertyTest extends AbstractTest
         }
     }
 
+    @Test
+    public void testSearchWithPropertyMatchingSampleProperty()
+    {
+        final String sessionToken = v3api.login(TEST_USER, PASSWORD);
+        final PropertyTypePermId propertyTypeId = createASamplePropertyType(sessionToken, null);
+
+        createEntity(sessionToken, propertyTypeId, "/CISD/CL1");
+
+        final AbstractEntitySearchCriteria<?> searchCriteria = createSearchCriteria();
+        searchCriteria.withOrOperator();
+        searchCriteria.withProperty(propertyTypeId.getPermId()).thatEquals("/CISD/CL1");
+
+        final List<? extends IPermIdHolder> entities = search(sessionToken, searchCriteria);
+        assertEquals(entities.size(), 1);
+    }
+
     private ObjectPermId createEntity(String sessionToken, PropertyTypePermId propertyTypeId, String value)
     {
         EntityTypePermId entityTypeId = createEntityType(sessionToken, propertyTypeId);
-- 
GitLab