Esempio n. 1
0
 public void testGetMainEntityList() {
   EntityCache cache = EntityCacheFactory.getInstance();
   EntityInterface participantEntity = GenericQueryGeneratorMock.createEntity("Participant");
   participantEntity = GenericQueryGeneratorMock.getEntity(cache, participantEntity);
   EntityInterface csrEntity =
       GenericQueryGeneratorMock.createEntity("CollectionProtocolRegistration");
   csrEntity = GenericQueryGeneratorMock.getEntity(cache, csrEntity);
   QueryCsmBizLogic.getMainEntityList(participantEntity, csrEntity);
 }
 /**
  * Test exportDetails method.
  *
  * @throws MultipleRootsException
  */
 public void testExportDetails() throws MultipleRootsException {
   ExportQueryBizLogic bizLogic = new ExportQueryBizLogic();
   IQuery query = GenericQueryGeneratorMock.creatParticipantQuery();
   IParameterizedQuery parameterizedQuery = QueryObjectFactory.createParameterizedQuery(query);
   List<List<String>> exportList = new ArrayList<List<String>>();
   bizLogic.exportDetails(parameterizedQuery, exportList);
   query = GenericQueryGeneratorMock.createInheritanceQueryWithAssociation1();
   parameterizedQuery = QueryObjectFactory.createParameterizedQuery(query);
   parameterizedQuery.setName("Query 1");
   bizLogic.exportDetails(parameterizedQuery, exportList);
 }