From c64ca25e7046fc29ced8ca57f0ef6d521debbdd0 Mon Sep 17 00:00:00 2001 From: vkovtun <viktor.kovtun@id.ethz.ch> Date: Fri, 18 Aug 2023 10:24:04 +0200 Subject: [PATCH] SSDM-13926: Writing tests for import/export API. Added tests for scripts. --- .../ethz/sis/openbis/systemtest/asapi/v3/ImportTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ImportTest.java b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ImportTest.java index 92f13ef2c28..d1d2b396e5e 100644 --- a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ImportTest.java +++ b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ImportTest.java @@ -202,16 +202,18 @@ public class ImportTest extends AbstractTest sampleTypeSearchCriteria.withCode().thatEquals("ANTIBODY"); final SampleTypeFetchOptions sampleTypeFetchOptions = new SampleTypeFetchOptions(); - sampleTypeFetchOptions.withPropertyAssignmentsUsing(new PropertyAssignmentFetchOptions()); + sampleTypeFetchOptions.withValidationPlugin().withScript(); final SearchResult<SampleType> sampleTypeSearchResult = v3api.searchSampleTypes(sessionToken, sampleTypeSearchCriteria, sampleTypeFetchOptions); assertEquals(1, sampleTypeSearchResult.getTotalCount()); - final Plugin validationPlugin = sampleTypeSearchResult.getObjects().get(0).getValidationPlugin(); + final SampleType sampleType = sampleTypeSearchResult.getObjects().get(0); + final Plugin validationPlugin = sampleType.getValidationPlugin(); + final String validationPluginBareName = name.substring(0, name.lastIndexOf(".")); - assertEquals(name, validationPlugin.getName()); + assertEquals(sampleType.getCode() + "." + validationPluginBareName, validationPlugin.getName()); assertEquals(source, validationPlugin.getScript()); v3api.logout(sessionToken); -- GitLab