-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1340 from b2ihealthcare/feature/SO-6036-associati…
…on-refset-shortening Make association reference set names less verbose for UI display purposes
- Loading branch information
Showing
4 changed files
with
125 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 15 additions & 3 deletions
18
...re.tests/src/com/b2international/snowowl/snomed/datastore/SnomedDescriptionUtilsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...atastore.tests/src/com/b2international/snowowl/snomed/datastore/SnomedRefSetUtilTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright 2024 B2i Healthcare, https://b2ihealthcare.com | ||
* | ||
* 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.datastore; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.junit.runners.Parameterized.Parameter; | ||
import org.junit.runners.Parameterized.Parameters; | ||
|
||
/** | ||
* @since 7.24.5 | ||
*/ | ||
@RunWith(Parameterized.class) | ||
public class SnomedRefSetUtilTest { | ||
|
||
// Close-to-but-not-quite-production reference set labels | ||
private static final Object[][] INPUT = { | ||
{ "FORMERLY association reference set", "Formerly" }, | ||
{ "IDENTICAL TO association reference set", "Identical to" }, | ||
{ "RELOCATED TO association reference set", "Relocated to" }, | ||
{ "Archival association reference set", "Archival" }, | ||
{ "RELOCATED FROM association reference set", "Relocated from" }, | ||
{ "ANALOGOUS TO association reference set", "Analogous to" }, | ||
{ "SUBSTITUTED BY association reference set", "Substituted by" }, | ||
{ "Was bundle of association reference set", "Was bundle of" }, | ||
{ "OPTIONAL association reference set", "Optional" }, | ||
{ "POINTS TO concept association reference set", "Points to" }, | ||
{ "POTENTIALLY SUBSTITUTED BY association reference set", "Potentially substituted by" }, | ||
{ "POTENTIALLY IDENTICAL TO association reference set", "Potentially identical to" }, | ||
{ "XHS Health Record Component association reference set", "XHS Health Record Component" }, | ||
{ "PARTIALLY IDENTICAL TO association reference set", "Partially identical to" }, | ||
{ "Frame and segment association reference set", "Frame and segment" }, | ||
{ "Frame and whole association reference set", "Frame and whole" }, | ||
{ "Had real medicinal product association reference set", "Had real medicinal product" }, | ||
{ "Had hypothetical medicinal product association reference set", "Had hypothetical medicinal product" }, | ||
{ "XHS catalog of medicines and devices association type reference set", "XHS catalog of medicines and devices" }, | ||
{ "European Blood Filtering Association reference set", "European Blood Filtering Association" }, | ||
{ "XHS catalog of medicines and devices Virtual Therapeutic Moiety revision association reference set", "XHS catalog of medicines and devices Virtual Therapeutic Moiety revision" }, | ||
}; | ||
|
||
@Parameters(name = "{0}") | ||
public static Object[][] data() { | ||
return INPUT; | ||
} | ||
|
||
@Parameter(0) | ||
public String refSetName; | ||
|
||
@Parameter(1) | ||
public String shortenedName; | ||
|
||
@Test | ||
public void testRefSetNameShortening() { | ||
assertEquals(shortenedName, SnomedRefSetUtil.shortenAssociationRefSetName(refSetName)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters