Skip to content
Snippets Groups Projects
Commit 7cfcc7c1 authored by buczekp's avatar buczekp
Browse files

[LMS-1767] fixed tests

SVN: 18682
parent 127906a9
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary; ...@@ -67,6 +67,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataStorePE; import ch.systemsx.cisd.openbis.generic.shared.dto.DataStorePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE; import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.LocatorTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyPE; import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyTermPE; import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyTermPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifier; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifier;
...@@ -421,12 +422,16 @@ public final class CommonClientServiceTest extends AbstractClientServiceTest ...@@ -421,12 +422,16 @@ public final class CommonClientServiceTest extends AbstractClientServiceTest
final TechId experimentId = CommonTestUtils.TECH_ID; final TechId experimentId = CommonTestUtils.TECH_ID;
final ExternalDataPE externalDataPE = new ExternalDataPE(); final ExternalDataPE externalDataPE = new ExternalDataPE();
final DataStorePE dataStorePE = new DataStorePE(); final DataStorePE dataStorePE = new DataStorePE();
dataStorePE.setCode("DS");
dataStorePE.setDownloadUrl(DATA_STORE_BASE_URL); dataStorePE.setDownloadUrl(DATA_STORE_BASE_URL);
externalDataPE.setDataStore(dataStorePE); externalDataPE.setDataStore(dataStorePE);
FileFormatTypePE fileFormatTypePE = new FileFormatTypePE(); FileFormatTypePE fileFormatTypePE = new FileFormatTypePE();
fileFormatTypePE.setCode("PNG"); fileFormatTypePE.setCode("PNG");
fileFormatTypePE.setDescription("Portable Network Graphics"); fileFormatTypePE.setDescription("Portable Network Graphics");
externalDataPE.setFileFormatType(fileFormatTypePE); externalDataPE.setFileFormatType(fileFormatTypePE);
LocatorTypePE locatorTypePE = new LocatorTypePE();
locatorTypePE.setCode("LOCATOR");
externalDataPE.setLocatorType(locatorTypePE);
final ExternalData externalData = final ExternalData externalData =
ExternalDataTranslator.translate(externalDataPE, BASE_INDEX_URL, false); ExternalDataTranslator.translate(externalDataPE, BASE_INDEX_URL, false);
context.checking(new Expectations() context.checking(new Expectations()
...@@ -457,6 +462,7 @@ public final class CommonClientServiceTest extends AbstractClientServiceTest ...@@ -457,6 +462,7 @@ public final class CommonClientServiceTest extends AbstractClientServiceTest
List<ExternalData> list = resultSet.getResultSet().getList().extractOriginalObjects(); List<ExternalData> list = resultSet.getResultSet().getList().extractOriginalObjects();
assertEquals(1, list.size()); assertEquals(1, list.size());
ExternalData data = list.get(0); ExternalData data = list.get(0);
// assertEquals(code, data.getCode());
assertEquals(DATA_STORE_BASE_URL + "/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME, data assertEquals(DATA_STORE_BASE_URL + "/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME, data
.getDataStore().getDownloadUrl()); .getDataStore().getDownloadUrl());
assertEquals("PNG", data.getFileFormatType().getCode()); assertEquals("PNG", data.getFileFormatType().getCode());
......
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