Skip to content
Snippets Groups Projects
Commit 4e3a5b2f authored by vkovtun's avatar vkovtun
Browse files

SSDM-10151 Added AbstractSearchPropertyTest.testSearchWithPropertyMatchingSampleProperty().

parent f13b488c
No related branches found
No related tags found
No related merge requests found
...@@ -510,6 +510,22 @@ public abstract class AbstractSearchPropertyTest extends AbstractTest ...@@ -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) private ObjectPermId createEntity(String sessionToken, PropertyTypePermId propertyTypeId, String value)
{ {
EntityTypePermId entityTypeId = createEntityType(sessionToken, propertyTypeId); EntityTypePermId entityTypeId = createEntityType(sessionToken, propertyTypeId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment