Skip to content

Commit

Permalink
Concept Map Types in the standard test dataset have the wrong uuids -…
Browse files Browse the repository at this point in the history
… TRUNK-3683

Updated the name of 'is a' concept name type in the test dataset to match that in the liquibase file and updated the related unit tests use the new name - TRUNK-3683
  • Loading branch information
guilhermejccavalcanti authored and wluyima committed Jun 11, 2013
1 parent 39ead7d commit 23b96b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions api/src/test/java/org/openmrs/api/ConceptServiceTest.java
Expand Up @@ -1661,7 +1661,7 @@ public void getConcepts_shouldReturnConceptSearchResultsThatMatchUniqueConcepts(
executeDataSet("org/openmrs/api/include/ConceptServiceTest-words.xml");
List<ConceptSearchResult> searchResults = conceptService.getConcepts("trust", Collections
.singletonList(Locale.ENGLISH), false, null, null, null, null, null, null, null);
//trust is included in 2 names for conceptid=3000 and in one name for conceptid=4000.
//trust is included in 2 names for conceptid=3000 and in one name for conceptid=4000.
//So we should see 2 results only
Assert.assertEquals(2, searchResults.size());
}
Expand All @@ -1675,7 +1675,7 @@ public void getConcepts_shouldReturnConceptSearchResultsThatContainAllSearchWord
executeDataSet("org/openmrs/api/include/ConceptServiceTest-words.xml");
List<ConceptSearchResult> searchResults = conceptService.getConcepts("trust now", Collections
.singletonList(Locale.ENGLISH), false, null, null, null, null, null, null, null);
//"trust now" is name for conceptid=4000.
//"trust now" is name for conceptid=4000.
//So we should see 1 results only
Assert.assertEquals(1, searchResults.size());
}
Expand Down Expand Up @@ -2224,11 +2224,12 @@ public void getDefaultConceptMapType_shouldReturnSameAsByDefault() throws Except
*/
@Test
public void getDefaultConceptMapType_shouldReturnTypeAsSetInGp() throws Exception {
Context.getAdministrationService().saveGlobalProperty(new GlobalProperty("concept.defaultConceptMapType", "is-a"));
final String testName = "is a";
Context.getAdministrationService().saveGlobalProperty(new GlobalProperty("concept.defaultConceptMapType", testName));

ConceptMapType conceptMapType = conceptService.getDefaultConceptMapType();
Assert.assertNotNull(conceptMapType);
Assert.assertEquals("is-a", conceptMapType.getName());
Assert.assertEquals(testName, conceptMapType.getName());
}

/**
Expand Down
Expand Up @@ -33,7 +33,7 @@ public class ConceptMapTypeValidatorTest extends BaseContextSensitiveTest {
@Verifies(value = "should fail if the concept map type name is a duplicate", method = "validate(Object,Errors)")
public void validate_shouldFailIfTheConceptMapTypeNameIsADuplicate() throws Exception {
ConceptMapType mapType = new ConceptMapType();
mapType.setName("is-a");
mapType.setName("is a");
Errors errors = new BindException(mapType, "mapType");
new ConceptMapTypeValidator().validate(mapType, errors);
Assert.assertEquals(true, errors.hasFieldErrors("name"));
Expand Down
Expand Up @@ -90,9 +90,9 @@
<concept_reference_term concept_reference_term_id="9" concept_source_id="1" code="127cd4689" name="cd4died term2" description="died" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="SSTRM-127689_3"/>
<concept_reference_term concept_reference_term_id="10" concept_source_id="1" code="454545" name="no term name3" description="" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="SSTRM-454545"/>
<concept_reference_term concept_reference_term_id="11" concept_source_id="1" code="retired code" name="retired name" description="test duplicate term that is retired" retired="1" retired_by="1" retire_reason="test reason" date_retired="2004-08-12 12:00:00" creator="1" date_created="2004-08-12 00:00:00.0" uuid="SSTRM-retired code"/>
<concept_map_type concept_map_type_id="1" name="is-a" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="8a8baebc-49d5-11e0-8fed-18a905e044dc"/>
<concept_map_type concept_map_type_id="2" name="same-as" description="Indicates similarity" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="f40555f0-49d5-11e0-8fed-18a905e044dc"/>
<concept_map_type concept_map_type_id="3" name="broader-than" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="fa864d62-49d5-11e0-8fed-18a905e044dc"/>
<concept_map_type concept_map_type_id="1" name="is a" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="1ce7a784-7d8f-11e1-909d-c80aa9edcf4e"/>
<concept_map_type concept_map_type_id="2" name="same-as" description="Indicates similarity" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="35543629-7d8c-11e1-909d-c80aa9edcf4e"/>
<concept_map_type concept_map_type_id="3" name="broader-than" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="4b9d9421-7d8c-11e1-909d-c80aa9edcf4e"/>
<concept_map_type concept_map_type_id="4" name="is-parent-to" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="0e7a8536-49d6-11e0-8fed-18a905e044dc"/>
<concept_map_type concept_map_type_id="5" name="related-to" is_hidden="0" retired="0" creator="1" date_created="2004-08-12 00:00:00.0" uuid="1ccba764-49d6-11e0-8fed-18a905e044dc"/>
<concept_map_type concept_map_type_id="6" name="testing" is_hidden="0" retired="1" retired_by="1" date_retired="2004-08-12 12:00:00" retire_reason="test reason" creator="1" date_created="2004-08-12 00:00:00.0" uuid="8ef30800-4db4-11e0-b7af-18a905e044dc"/>
Expand Down Expand Up @@ -214,7 +214,7 @@
<person_name person_name_id="9348" preferred="true" person_id="1" given_name="Super" middle_name="" family_name="User" creator="1" date_created="2005-01-01 00:00:00.0" voided="false" uuid="38a686df-d459-484c-9e7c-3f43a9bced58"/>
<person_name person_name_id="9349" preferred="false" person_id="501" given_name="Bruno" middle_name="" family_name="Otterbourg" creator="1" date_created="2008-08-15 15:46:47.0" voided="false" uuid="d7e51684-a077-4039-9d85-8fd599609156"/>
<person_name person_name_id="9350" preferred="false" person_id="502" given_name="Hippocrates" middle_name="" family_name="of Cos" creator="1" date_created="2008-08-15 15:57:09.0" voided="false" uuid="0e69f78c-e3f2-4d9c-933b-d52aa8a669b8"/>
<person_name person_name_id="9351" preferred="true" person_id="6" given_name="Johnny" middle_name="Test" family_name="Doe" creator="1" date_created="2008-08-18 11:44:02.0" voided="false" void_reason="" uuid="c8fb44f1-b54c-4741-a485-1d435ec8e28f"/>
<person_name person_name_id="9351" preferred="true" person_id="6" given_name="Johnny" middle_name="Test" family_name="Doe" creator="1" date_created="2008-08-18 11:44:02.0" voided="false" void_reason="" uuid="c8fb44f1-b54c-4741-a485-1d435ec8e28f"/>
<patient patient_id="2" creator="1" date_created="2005-09-22 00:00:00.0" changed_by="1" date_changed="2008-08-18 12:29:59.0" voided="false" void_reason=""/>
<patient patient_id="6" creator="1" date_created="2006-01-18 00:00:00.0" changed_by="1" date_changed="2008-08-18 12:25:31.0" voided="false" void_reason=",,,,"/>
<patient patient_id="7" creator="1" date_created="2006-01-18 00:00:00.0" changed_by="1" date_changed="2008-08-18 12:25:57.0" voided="false" void_reason=""/>
Expand Down Expand Up @@ -280,10 +280,10 @@
<drug_order order_id="2" drug_inventory_id="2" dose="1.0" dose_units="tab(s)" frequency="1/day x 7 days/week" as_needed="false" brand_name="BRAND NAME"/>
<drug_order order_id="3" drug_inventory_id="2" dose="2.0" dose_units="tab(s)" frequency="1/day x 7 days/week" as_needed="false" brand_name="BRAND NAME"/>
<drug_order order_id="4" drug_inventory_id="3" dose="325.0" dose_units="mg" frequency="1/day x 7 days/week" as_needed="false" brand_name="BRAND NAME"/>
<drug_order order_id="5" drug_inventory_id="3" dose="325.0" dose_units="mg" frequency="1/day x 7 days/week" as_needed="false" brand_name="BRAND NAME"/>
<drug_order order_id="5" drug_inventory_id="3" dose="325.0" dose_units="mg" frequency="1/day x 7 days/week" as_needed="false" brand_name="BRAND NAME"/>
<program program_id="1" concept_id="9" creator="1" date_created="2008-08-15 16:07:11.0" changed_by="1" date_changed="2008-08-15 17:04:50.0" retired="false" name="HIV PROGRAM" description="hiv program" uuid="da4a0391-ba62-4fad-ad66-1e3722d16380"/>
<program program_id="2" concept_id="10" creator="1" date_created="2008-08-15 16:07:34.0" retired="false" name="MDR-TB PROGRAM" description="MDR-TB program" uuid="71779c39-d289-4dfe-91b5-e7cfaa27c78b"/>
<program program_id="3" concept_id="11" creator="1" date_created="2008-08-15 16:08:51.0" changed_by="1" date_changed="2008-08-15 16:09:00.0" retired="true" name="MALARIA PROGRAM" description="Malaria program" uuid="f386c3d2-dd75-441f-a582-2237824edfb0"/>
<program program_id="3" concept_id="11" creator="1" date_created="2008-08-15 16:08:51.0" changed_by="1" date_changed="2008-08-15 16:09:00.0" retired="true" name="MALARIA PROGRAM" description="Malaria program" uuid="f386c3d2-dd75-441f-a582-2237824edfb0"/>
<program_workflow program_workflow_id="1" program_id="1" concept_id="13" creator="1" date_created="2008-08-15 17:01:00.0" retired="false" changed_by="1" date_changed="2008-08-15 17:04:50.0" uuid="84f0effa-dd73-46cb-b931-7cd6be6c5f81"/>
<program_workflow program_workflow_id="2" program_id="1" concept_id="12" creator="1" date_created="2008-08-15 17:01:00.0" retired="false" changed_by="1" date_changed="2008-08-15 17:04:50.0" uuid="c66c8713-7df4-40de-96f6-dc4cce3432da"/>
<program_workflow_state program_workflow_state_id="1" program_workflow_id="1" concept_id="16" initial="false" terminal="true" creator="1" date_created="2008-08-15 17:04:02.0" retired="false" changed_by="1" date_changed="2008-08-15 17:04:50.0" uuid="92584cdc-6a20-4c84-a659-e035e45d36b0"/>
Expand Down

0 comments on commit 23b96b2

Please sign in to comment.