<commit_before>/*
 * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.b2international.snowowl.snomed.api.rest;

import org.junit.ClassRule;
import org.junit.rules.RuleChain;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import com.b2international.commons.platform.PlatformUtil;
import com.b2international.snowowl.core.branch.Branch;
import com.b2international.snowowl.snomed.api.japi.branches.BranchCompareRequestTest;
import com.b2international.snowowl.snomed.api.japi.branches.SnomedBranchRequestTest;
import com.b2international.snowowl.snomed.api.japi.io.SnomedRefSetDSVExportTest;
import com.b2international.snowowl.snomed.api.japi.issue.EclSerializerTest;
import com.b2international.snowowl.snomed.api.japi.issue.IssueSO2503RemoteJobDynamicMappingFix;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedBranchingApiTest;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedListFeaturesTests;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedMergeApiTest;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedMergeConflictTest;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedReviewApiTest;
import com.b2international.snowowl.snomed.api.rest.browser.SnomedBrowserApiTest;
import com.b2international.snowowl.snomed.api.rest.classification.SnomedClassificationApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedConceptApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedDescriptionApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedModuleDependencyRefsetTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetBulkApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetMemberApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetMemberParameterizedTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetParameterizedTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRelationshipApiTest;
import com.b2international.snowowl.snomed.api.rest.ext.SnomedExtensionDowngradeTest;
import com.b2international.snowowl.snomed.api.rest.ext.SnomedExtensionUpgradeTest;
import com.b2international.snowowl.snomed.api.rest.ext.SnomedExtensionVersioningTest;
import com.b2international.snowowl.snomed.api.rest.id.SnomedIdentifierApiTest;
import com.b2international.snowowl.snomed.api.rest.io.SnomedExportApiTest;
import com.b2international.snowowl.snomed.api.rest.io.SnomedImportApiTest;
import com.b2international.snowowl.snomed.api.rest.perf.SnomedConceptCreatePerformanceTest;
import com.b2international.snowowl.snomed.api.rest.perf.SnomedMergePerformanceTest;
import com.b2international.snowowl.snomed.api.rest.versioning.SnomedVersioningApiTest;
import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants;
import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType;
import com.b2international.snowowl.test.commons.BundleStartRule;
import com.b2international.snowowl.test.commons.Resources;
import com.b2international.snowowl.test.commons.SnomedContentRule;
import com.b2international.snowowl.test.commons.SnowOwlAppRule;

/**
 * @since 1.0
 */
@RunWith(Suite.class)
@SuiteClasses({ 
	// RESTful API test cases
	SnomedMergePerformanceTest.class,
	IssueSO2503RemoteJobDynamicMappingFix.class,
	Issue3019FixDeletionOfReferringMembersTest.class,
	SnomedBranchingApiTest.class,
	SnomedMergeApiTest.class,
	SnomedListFeaturesTests.class,
	SnomedMergeConflictTest.class,
	SnomedReviewApiTest.class,
	SnomedVersioningApiTest.class,
	SnomedImportApiTest.class,
	SnomedIdentifierApiTest.class,
	SnomedConceptApiTest.class,
	SnomedConceptCreatePerformanceTest.class,
	SnomedDescriptionApiTest.class,
	SnomedRelationshipApiTest.class,
	SnomedRefSetApiTest.class,
	SnomedRefSetParameterizedTest.class,
	SnomedRefSetMemberParameterizedTest.class,
	SnomedRefSetMemberApiTest.class,
	SnomedRefSetBulkApiTest.class,
	SnomedBrowserApiTest.class,
	SnomedClassificationApiTest.class,
	SnomedExportApiTest.class,
	// Module dependecy test cases
	SnomedModuleDependencyRefsetTest.class,
	// Extension test cases
	SnomedExtensionUpgradeTest.class,
	SnomedExtensionDowngradeTest.class,
	SnomedExtensionVersioningTest.class,
	// Java API test cases
	SnomedBranchRequestTest.class,
	BranchCompareRequestTest.class,
	SnomedRefSetDSVExportTest.class,
	EclSerializerTest.class
})
public class AllSnomedApiTests {

	@ClassRule
	public static final RuleChain appRule = RuleChain
			.outerRule(SnowOwlAppRule.snowOwl().clearResources(true).config(PlatformUtil.toAbsolutePath(AllSnomedApiTests.class, "snomed-api-test-config.yml")))
			.around(new BundleStartRule("com.b2international.snowowl.api.rest"))
			.around(new BundleStartRule("com.b2international.snowowl.snomed.api.rest"))
			.around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_INT, Rf2ReleaseType.FULL))
			.around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME, SnomedApiTestConstants.EXTENSION_PATH, Resources.Snomed.MINI_RF2_EXT, Rf2ReleaseType.DELTA));

}<commit_msg>SO-3044: change execution order of SNOMED CT integration tests<commit_after>/*
 * Copyright 2011-2017 B2i Healthcare Pte Ltd, http://b2i.sg
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.b2international.snowowl.snomed.api.rest;

import org.junit.ClassRule;
import org.junit.rules.RuleChain;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import com.b2international.commons.platform.PlatformUtil;
import com.b2international.snowowl.core.branch.Branch;
import com.b2international.snowowl.snomed.api.japi.branches.BranchCompareRequestTest;
import com.b2international.snowowl.snomed.api.japi.branches.SnomedBranchRequestTest;
import com.b2international.snowowl.snomed.api.japi.io.SnomedRefSetDSVExportTest;
import com.b2international.snowowl.snomed.api.japi.issue.EclSerializerTest;
import com.b2international.snowowl.snomed.api.japi.issue.IssueSO2503RemoteJobDynamicMappingFix;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedBranchingApiTest;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedListFeaturesTests;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedMergeApiTest;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedMergeConflictTest;
import com.b2international.snowowl.snomed.api.rest.branches.SnomedReviewApiTest;
import com.b2international.snowowl.snomed.api.rest.browser.SnomedBrowserApiTest;
import com.b2international.snowowl.snomed.api.rest.classification.SnomedClassificationApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedConceptApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedDescriptionApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedModuleDependencyRefsetTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetBulkApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetMemberApiTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetMemberParameterizedTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRefSetParameterizedTest;
import com.b2international.snowowl.snomed.api.rest.components.SnomedRelationshipApiTest;
import com.b2international.snowowl.snomed.api.rest.ext.SnomedExtensionDowngradeTest;
import com.b2international.snowowl.snomed.api.rest.ext.SnomedExtensionUpgradeTest;
import com.b2international.snowowl.snomed.api.rest.ext.SnomedExtensionVersioningTest;
import com.b2international.snowowl.snomed.api.rest.id.SnomedIdentifierApiTest;
import com.b2international.snowowl.snomed.api.rest.io.SnomedExportApiTest;
import com.b2international.snowowl.snomed.api.rest.io.SnomedImportApiTest;
import com.b2international.snowowl.snomed.api.rest.perf.SnomedConceptCreatePerformanceTest;
import com.b2international.snowowl.snomed.api.rest.perf.SnomedMergePerformanceTest;
import com.b2international.snowowl.snomed.api.rest.versioning.SnomedVersioningApiTest;
import com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants;
import com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType;
import com.b2international.snowowl.test.commons.BundleStartRule;
import com.b2international.snowowl.test.commons.Resources;
import com.b2international.snowowl.test.commons.SnomedContentRule;
import com.b2international.snowowl.test.commons.SnowOwlAppRule;

/**
 * @since 1.0
 */
@RunWith(Suite.class)
@SuiteClasses({ 
	// High-level issue test cases, Java API test cases
	IssueSO2503RemoteJobDynamicMappingFix.class,
	Issue3019FixDeletionOfReferringMembersTest.class,
	SnomedListFeaturesTests.class,
	EclSerializerTest.class,
	// RESTful API test cases
	// Branch API tests
	SnomedBranchRequestTest.class,
	BranchCompareRequestTest.class,
	SnomedBranchingApiTest.class,
	// Component API test cases
	SnomedIdentifierApiTest.class,
	SnomedConceptApiTest.class,
	SnomedDescriptionApiTest.class,
	SnomedRelationshipApiTest.class,
	SnomedRefSetApiTest.class,
	SnomedRefSetParameterizedTest.class,
	SnomedRefSetMemberParameterizedTest.class,
	SnomedRefSetMemberApiTest.class,
	SnomedRefSetBulkApiTest.class,
	SnomedBrowserApiTest.class,
	// Merge, Review test cases
	SnomedMergeApiTest.class,
	SnomedMergeConflictTest.class,
	SnomedReviewApiTest.class,
	// Import-Export-Versioning-Classification
	SnomedClassificationApiTest.class,
	SnomedImportApiTest.class,
	SnomedExportApiTest.class,
	SnomedRefSetDSVExportTest.class,
	// Module dependecy test cases - they modify the MAIN branch so should be executed after tests that rely on MAIN branch stuff
	SnomedModuleDependencyRefsetTest.class,
	SnomedVersioningApiTest.class,
	// Extension test cases
	SnomedExtensionUpgradeTest.class,
	SnomedExtensionDowngradeTest.class,
	SnomedExtensionVersioningTest.class,
	// Performance test cases
	SnomedConceptCreatePerformanceTest.class,
	SnomedMergePerformanceTest.class,
})
public class AllSnomedApiTests {

	@ClassRule
	public static final RuleChain appRule = RuleChain
			.outerRule(SnowOwlAppRule.snowOwl().clearResources(true).config(PlatformUtil.toAbsolutePath(AllSnomedApiTests.class, "snomed-api-test-config.yml")))
			.around(new BundleStartRule("com.b2international.snowowl.api.rest"))
			.around(new BundleStartRule("com.b2international.snowowl.snomed.api.rest"))
			.around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_SHORT_NAME, Branch.MAIN_PATH, Resources.Snomed.MINI_RF2_INT, Rf2ReleaseType.FULL))
			.around(new SnomedContentRule(SnomedTerminologyComponentConstants.SNOMED_B2I_SHORT_NAME, SnomedApiTestConstants.EXTENSION_PATH, Resources.Snomed.MINI_RF2_EXT, Rf2ReleaseType.DELTA));

}
{'fraction_non_alphanumeric': 0.08783120706575073, 'fraction_numerical': 0.012594046450768727, 'mean_word_length': 7.109416445623342, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1470754', 'n_tokens_mistral': 4161, 'n_tokens_neox': 3909, 'n_words': 544}