Skip to content
Snippets Groups Projects
Commit 260ec56b authored by felmer's avatar felmer
Browse files

SP-347, BIS-178: Fixing test

SVN: 27432
parent c4ed53f3
No related branches found
No related tags found
No related merge requests found
......@@ -43,9 +43,6 @@ public abstract class AbstractLoaderTestCase extends AbstractDAOWithoutContextTe
private static final String SESSION_TOKEN = "session-token";
protected static final Session SESSION = new Session(CommonTestUtils.USER_ID, SESSION_TOKEN,
PRINCIPAL, "remote-host", 1);
protected ICommonBusinessObjectFactory boFactory;
@Autowired
......@@ -53,4 +50,10 @@ public abstract class AbstractLoaderTestCase extends AbstractDAOWithoutContextTe
{
this.boFactory = boFactory;
}
protected Session session()
{
return new Session(CommonTestUtils.USER_ID, SESSION_TOKEN,
PRINCIPAL, "remote-host", 1);
}
}
......@@ -25,7 +25,8 @@ import java.util.List;
import org.testng.annotations.Test;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample;
import ch.systemsx.cisd.openbis.plugin.proteomics.server.business.SampleLoader;
import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
/**
*
......@@ -39,7 +40,9 @@ public class SampleLoaderTest extends AbstractLoaderTestCase
@Test
public void test()
{
SampleLoader loader = new SampleLoader(SESSION, daoFactory, boFactory);
Session session = session();
session.setPerson(new PersonPE());
SampleLoader loader = new SampleLoader(session, daoFactory, boFactory);
List<Sample> samples = loader.listSamplesWithParentsByTypeAndSpace("CELL_PLATE", "CISD");
Collections.sort(samples, new Comparator<Sample>()
{
......
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