Skip to content
Snippets Groups Projects
Commit deedbfe6 authored by anttil's avatar anttil
Browse files

SSDM-4959: fix tests

SVN: 38241
parent 6f8ff1a8
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,6 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.create.DataSetCreation;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.create.LinkedDataCreation;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.delete.DataSetDeletionOptions;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.fetchoptions.DataSetFetchOptions;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.fetchoptions.LinkedDataFetchOptions;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.IContentCopyId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.IDataSetId;
......@@ -104,9 +103,7 @@ public abstract class AbstractLinkDataSetTest extends AbstractExternalDmsTest
protected DataSet get(DataSetPermId id)
{
DataSetFetchOptions fo = new DataSetFetchOptions();
LinkedDataFetchOptions lfo = new LinkedDataFetchOptions();
lfo.withExternalDms();
fo.withLinkedDataUsing(lfo);
fo.withLinkedData().withExternalDms();
Map<IDataSetId, DataSet> result = v3api.getDataSets(session, Collections.singletonList(id), fo);
return result.get(id);
}
......
......@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.fetchoptions.LinkedDataFetchOptions;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.ExternalDms;
import ch.ethz.sis.openbis.generic.asapi.v3.exceptions.NotFetchedException;
import ch.systemsx.cisd.base.annotation.JsonObject;
import ch.systemsx.cisd.common.annotation.TechPreview;
......@@ -77,13 +76,7 @@ public class LinkedData implements Serializable
@JsonIgnore
public ExternalDms getExternalDms()
{
if (getFetchOptions() != null && getFetchOptions().hasExternalDms())
{
return externalDms;
} else
{
throw new NotFetchedException("External data management system has not been fetched.");
}
return externalDms;
}
// Method automatically generated with DtoGenerator
......
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