<commit_before>package gov.nih.nci.cabig.caaers.web.participant;

import gov.nih.nci.cabig.caaers.dao.query.OrganizationQuery;
import gov.nih.nci.cabig.caaers.domain.DateValue;
import gov.nih.nci.cabig.caaers.domain.LocalOrganization;
import gov.nih.nci.cabig.caaers.domain.Organization;
import gov.nih.nci.cabig.caaers.domain.Participant;
import gov.nih.nci.cabig.caaers.domain.SystemAssignedIdentifier;
import gov.nih.nci.cabig.caaers.domain.repository.OrganizationRepository;
import gov.nih.nci.cabig.caaers.web.utils.ConfigPropertyHelper;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author <NAME>
 */
public class CreateParticipantTabTest extends AbstractTabTestCase<CreateParticipantTab, ParticipantInputCommand> {

    private CreateParticipantTab createParticipantTab;

    private ParticipantInputCommand newParticipantCommand;

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        ConfigPropertyHelper.putParticipantIdentifiersType(configProperty);
    }


    @Override
    protected CreateParticipantTab createTab() {
        createParticipantTab = new CreateParticipantTab();
        createParticipantTab.setOrganizationRepository(new OrganizationRepository(){
        	public void create(Organization organization) {
        		// TODO Auto-generated method stub
        		
        	}
        	public void createOrUpdate(Organization organization) {
        		// TODO Auto-generated method stub
        		
        	}
        	public List<Organization> getOrganizationsHavingStudySites() {
        		return new ArrayList<Organization>();
        	}
			public void convertToRemote(Organization localOrganization,
					Organization remoteOrganization) {
				// TODO Auto-generated method stub
				
			}
			public List<Organization> getAll() {
				// TODO Auto-generated method stub
				return null;
			}
			public List<Organization> restrictBySubnames(String[] subnames) {
				// TODO Auto-generated method stub
				return null;
			}
			public List<Organization> searchOrganization(OrganizationQuery query) {
				// TODO Auto-generated method stub
				return null;
			}
			public List<Organization> searchRemoteOrganization(String coppaSearchText, String sType) {
				// TODO Auto-generated method stub
				return null;
			}

        	
        });
        createParticipantTab.setListValues(listValues);
        createParticipantTab.setConfigurationProperty(configProperty);

        return createParticipantTab;
    }

    @Override
    protected ParticipantInputCommand createCommand() {
        newParticipantCommand = new ParticipantInputCommand();
        newParticipantCommand.setParticipant(new Participant());

        return newParticipantCommand;
    }<commit_msg>CAAERS-3482 - TestCase fix<commit_after>package gov.nih.nci.cabig.caaers.web.participant;

import gov.nih.nci.cabig.caaers.dao.ParticipantDao;
import gov.nih.nci.cabig.caaers.dao.query.OrganizationQuery;
import gov.nih.nci.cabig.caaers.domain.DateValue;
import gov.nih.nci.cabig.caaers.domain.LocalOrganization;
import gov.nih.nci.cabig.caaers.domain.Organization;
import gov.nih.nci.cabig.caaers.domain.Participant;
import gov.nih.nci.cabig.caaers.domain.SystemAssignedIdentifier;
import gov.nih.nci.cabig.caaers.domain.repository.OrganizationRepository;
import gov.nih.nci.cabig.caaers.web.utils.ConfigPropertyHelper;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author <NAME>
 * @author <NAME>
 */
public class CreateParticipantTabTest extends AbstractTabTestCase<CreateParticipantTab, ParticipantInputCommand> {

    private CreateParticipantTab createParticipantTab;
    private ParticipantInputCommand newParticipantCommand;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        ConfigPropertyHelper.putParticipantIdentifiersType(configProperty);
    }

    @Override
    protected CreateParticipantTab createTab() {
        createParticipantTab = new CreateParticipantTab();
        createParticipantTab.setOrganizationRepository(new OrganizationRepository(){
        	public void create(Organization organization) {
        		// TODO Auto-generated method stub
        		
        	}
        	public void createOrUpdate(Organization organization) {
        		// TODO Auto-generated method stub
        		
        	}
        	public List<Organization> getOrganizationsHavingStudySites() {
        		return new ArrayList<Organization>();
        	}
			public void convertToRemote(Organization localOrganization,
					Organization remoteOrganization) {
				// TODO Auto-generated method stub
				
			}
			public List<Organization> getAll() {
				// TODO Auto-generated method stub
				return null;
			}
			public List<Organization> restrictBySubnames(String[] subnames) {
				// TODO Auto-generated method stub
				return null;
			}
			public List<Organization> searchOrganization(OrganizationQuery query) {
				// TODO Auto-generated method stub
				return null;
			}
			public List<Organization> searchRemoteOrganization(String coppaSearchText, String sType) {
				// TODO Auto-generated method stub
				return null;
			}
        	
        });
        createParticipantTab.setListValues(listValues);
        createParticipantTab.setConfigurationProperty(configProperty);
        createParticipantTab.setParticipantDao((ParticipantDao)getDeployedApplicationContext().getBean("participantDao"));
        return createParticipantTab;
    }

    @Override
    protected ParticipantInputCommand createCommand() {
        newParticipantCommand = new ParticipantInputCommand();
        newParticipantCommand.setParticipant(new Participant());
        newParticipantCommand.setOrganization(new LocalOrganization());
        newParticipantCommand.getOrganization().setId(-1);
        return newParticipantCommand;
    }
{'fraction_non_alphanumeric': 0.08337604647189475, 'fraction_numerical': 0.0008542627712284299, 'mean_word_length': 3.6313291139240507, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1122175', 'n_tokens_mistral': 1815, 'n_tokens_neox': 1642, 'n_words': 296}