<commit_before>/*******************************************************************************
 * Copyright (c) 2010, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.openhealthtools.mdht.uml.cda.ccd.operations;

import static org.junit.Assert.assertTrue;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.ecore.EObject;
import org.junit.Test;
import org.openhealthtools.mdht.uml.cda.CDAFactory;
import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
import org.openhealthtools.mdht.uml.cda.Section;
import org.openhealthtools.mdht.uml.cda.ccd.CCDFactory;
import org.openhealthtools.mdht.uml.cda.ccd.VitalSignsOrganizer;

/**
 * This class is a JUnit4 test case.
 */
@SuppressWarnings("nls")
public class VitalSignsOrganizerOperationsTest extends CCDValidationTest {

	protected static final String VITAL_SIGNS_ORGANIZER_TEMPLATE_ID = "2.16.840.1.113883.10.20.1.35";

	/**
	 * Not a real test, needed for EMMA to report 100% method coverage.
	 */
	@SuppressWarnings("unused")
	@Test
	public void testConstructor() {
		VitalSignsOrganizerOperations obj = new VitalSignsOrganizerOperations();
		assertTrue(true);
	} // testConstructor

	private static final CDATestCase TEST_CASE_ARRAY[] = {
			// Template ID
			// -------------------------------------------------------------
			new TemplateIDValidationTest(VITAL_SIGNS_ORGANIZER_TEMPLATE_ID) {

				@Override
				protected boolean validate(final EObject objectToTest, final BasicDiagnostic diagnostician,
						final Map<Object, Object> map) {
					return VitalSignsOrganizerOperations.validateResultOrganizerTemplateId(
						(VitalSignsOrganizer) objectToTest, diagnostician, map);
				}

			},

			// Information Source
			// -------------------------------------------------------------
			new InformationSourceCCDValidationTest() {
				@Override
				protected boolean validate(final EObject objectToTest, final BasicDiagnostic diagnostician,
						final Map<Object, Object> map) {
					return VitalSignsOrganizerOperations.validateVitalSignsOrganizerInformationSource(
						(VitalSignsOrganizer) objectToTest, diagnostician, map);
				}
			}

	}; // TEST_CASE_ARRAY

	@Override
	protected List<CDATestCase> getTestCases() {
		// Return a new List because the one returned by Arrays.asList is
		// unmodifiable so a sub-class can't append their test cases.
		final List<CDATestCase> retValue = super.getTestCases();
		retValue.addAll(Arrays.asList(TEST_CASE_ARRAY));
		return retValue;
	}

	@Override
	protected EObject getObjectToTest() {
		ClinicalDocument clinicalDocument = CDAFactory.eINSTANCE.createClinicalDocument();
		Section section = CDAFactory.eINSTANCE.createSection();
		clinicalDocument.addSection(section);
		VitalSignsOrganizer vitalSignsOrganizer = CCDFactory.eINSTANCE.createVitalSignsOrganizer();
		section.addOrganizer(vitalSignsOrganizer);
		return vitalSignsOrganizer;
		// return CCDFactory.eINSTANCE.createVitalSignsOrganizer();
	}<commit_msg>droppped information source test<commit_after>/*******************************************************************************
 * Copyright (c) 2010, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.openhealthtools.mdht.uml.cda.ccd.operations;

import static org.junit.Assert.assertTrue;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.ecore.EObject;
import org.junit.Test;
import org.openhealthtools.mdht.uml.cda.CDAFactory;
import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
import org.openhealthtools.mdht.uml.cda.Section;
import org.openhealthtools.mdht.uml.cda.ccd.CCDFactory;
import org.openhealthtools.mdht.uml.cda.ccd.VitalSignsOrganizer;

/**
 * This class is a JUnit4 test case.
 */
@SuppressWarnings("nls")
public class VitalSignsOrganizerOperationsTest extends CCDValidationTest {

	protected static final String VITAL_SIGNS_ORGANIZER_TEMPLATE_ID = "2.16.840.1.113883.10.20.1.35";

	/**
	 * Not a real test, needed for EMMA to report 100% method coverage.
	 */
	@SuppressWarnings("unused")
	@Test
	public void testConstructor() {
		VitalSignsOrganizerOperations obj = new VitalSignsOrganizerOperations();
		assertTrue(true);
	} // testConstructor

	private static final CDATestCase TEST_CASE_ARRAY[] = {
			// Template ID
			// -------------------------------------------------------------
			new TemplateIDValidationTest(VITAL_SIGNS_ORGANIZER_TEMPLATE_ID) {

				@Override
				protected boolean validate(final EObject objectToTest, final BasicDiagnostic diagnostician,
						final Map<Object, Object> map) {
					return VitalSignsOrganizerOperations.validateResultOrganizerTemplateId(
						(VitalSignsOrganizer) objectToTest, diagnostician, map);
				}

			}
//			,
//
//			// Information Source
//			// -------------------------------------------------------------
//			new InformationSourceCCDValidationTest() {
//				@Override
//				protected boolean validate(final EObject objectToTest, final BasicDiagnostic diagnostician,
//						final Map<Object, Object> map) {
//					return VitalSignsOrganizerOperations.validateVitalSignsOrganizerInformationSource(
//						(VitalSignsOrganizer) objectToTest, diagnostician, map);
//				}
//			}

	}; // TEST_CASE_ARRAY

	@Override
	protected List<CDATestCase> getTestCases() {
		// Return a new List because the one returned by Arrays.asList is
		// unmodifiable so a sub-class can't append their test cases.
		final List<CDATestCase> retValue = super.getTestCases();
		retValue.addAll(Arrays.asList(TEST_CASE_ARRAY));
		return retValue;
	}

	@Override
	protected EObject getObjectToTest() {
		ClinicalDocument clinicalDocument = CDAFactory.eINSTANCE.createClinicalDocument();
		Section section = CDAFactory.eINSTANCE.createSection();
		clinicalDocument.addSection(section);
		VitalSignsOrganizer vitalSignsOrganizer = CCDFactory.eINSTANCE.createVitalSignsOrganizer();
		section.addOrganizer(vitalSignsOrganizer);
		return vitalSignsOrganizer;
		// return CCDFactory.eINSTANCE.createVitalSignsOrganizer();
	}
{'fraction_non_alphanumeric': 0.16586921850079744, 'fraction_numerical': 0.010439321444106133, 'mean_word_length': 4.087020648967552, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '383319', 'n_tokens_mistral': 2203, 'n_tokens_neox': 2005, 'n_words': 437}