Skip to content
Snippets Groups Projects
Commit 77e50c6c authored by juanf's avatar juanf
Browse files

Revert "SSDM-13207 : Fixing tests"

This reverts commit 0d3d593a.
parent f8ae76eb
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -16,7 +16,6 @@
package ch.systemsx.cisd.openbis.generic.server;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.DAOFactory;
import ch.systemsx.cisd.openbis.generic.shared.ISessionWorkspaceProvider;
import ch.systemsx.cisd.openbis.generic.shared.SessionWorkspaceProvider;
import org.springframework.context.ApplicationContext;
......@@ -42,8 +41,6 @@ public class CommonServiceProvider
{
private static ApplicationContext applicationContext;
private static IDAOFactory daoFactory;
public static void setApplicationContext(ApplicationContext context)
{
applicationContext = context;
......@@ -66,15 +63,7 @@ public class CommonServiceProvider
public static IDAOFactory getDAOFactory()
{
if (daoFactory == null) {
daoFactory = (IDAOFactory) applicationContext.getBean("dao-factory");
}
return daoFactory;
}
public static void setDAOFactory(IDAOFactory daoFactory)
{
CommonServiceProvider.daoFactory = daoFactory;
return (IDAOFactory) applicationContext.getBean("dao-factory");
}
public static ICommonBusinessObjectFactory getBusinessObjectFactory()
......
......@@ -19,8 +19,6 @@ package ch.systemsx.cisd.openbis.generic.shared;
import java.util.ArrayList;
import java.util.Arrays;
import ch.systemsx.cisd.openbis.generic.server.CommonServiceProvider;
import ch.systemsx.cisd.openbis.generic.shared.dto.*;
import org.apache.log4j.Level;
import org.jmock.Expectations;
import org.jmock.Mockery;
......@@ -86,6 +84,15 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.PersistencyResources;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.IPermIdDAO;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DisplaySettings;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewExperiment;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataSetTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataStorePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
import ch.systemsx.cisd.openbis.generic.shared.util.MaterialConfigurationProvider;
import ch.systemsx.cisd.openbis.util.LogRecordingUtils;
......@@ -127,8 +134,6 @@ public abstract class AbstractServerTestCase extends AssertJUnit
protected ISampleDAO sampleDAO;
protected ISampleRelationshipDAO sampleRelationshipDAO;
protected ISpaceBO spaceBO;
protected ISampleBO sampleBO;
......@@ -231,12 +236,10 @@ public abstract class AbstractServerTestCase extends AssertJUnit
propertiesBatchManager = context.mock(IPropertiesBatchManager.class);
// DAO
daoFactory = context.mock(IDAOFactory.class);
CommonServiceProvider.setDAOFactory(daoFactory);
personDAO = context.mock(IPersonDAO.class);
groupDAO = context.mock(ISpaceDAO.class);
spaceDAO = groupDAO;
sampleDAO = context.mock(ISampleDAO.class);
sampleRelationshipDAO = context.mock(ISampleRelationshipDAO.class);
roleAssignmentDAO = context.mock(IRoleAssignmentDAO.class);
dataSetDAO = context.mock(IDataDAO.class);
permIdDAO = context.mock(IPermIdDAO.class);
......@@ -295,8 +298,6 @@ public abstract class AbstractServerTestCase extends AssertJUnit
will(returnValue(groupDAO));
allowing(daoFactory).getSampleDAO();
will(returnValue(sampleDAO));
allowing(daoFactory).getSampleRelationshipDAO();
will(returnValue(sampleRelationshipDAO));
allowing(daoFactory).getExperimentDAO();
will(returnValue(experimentDAO));
allowing(daoFactory).getRoleAssignmentDAO();
......
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