Changeset 5215 for openmrs/branches/data_synchronization_bidirectional/test/api/org/openmrs/test/synchronization/engine/SyncConceptTest.java
- Timestamp:
- 08/09/08 16:18:42 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/branches/data_synchronization_bidirectional/test/api/org/openmrs/test/synchronization/engine/SyncConceptTest.java
r5133 r5215 14 14 package org.openmrs.test.synchronization.engine; 15 15 16 import static org.junit.Assert.assertEquals; 17 import static org.junit.Assert.assertNotSame; 18 import static org.junit.Assert.assertTrue; 19 import static org.junit.Assert.assertFalse; 20 import static org.junit.Assert.assertNull; 21 import static org.junit.Assert.assertNotNull; 22 import org.junit.Test; 23 16 24 import java.util.HashSet; 17 25 import java.util.Locale; … … 29 37 import org.openmrs.api.ConceptService; 30 38 import org.openmrs.api.context.Context; 39 import org.springframework.test.annotation.NotTransactional; 31 40 32 41 /** … … 40 49 } 41 50 51 @Test 52 @NotTransactional 42 53 public void testSaveConceptCoded() throws Exception { 43 54 runSyncTest(new SyncTestHelper() { … … 72 83 } 73 84 }); 74 } 85 } 86 87 @Test 88 @NotTransactional 75 89 public void testSaveConceptNumeric() throws Exception { 76 90 runSyncTest(new SyncTestHelper() { … … 97 111 assertEquals(cs.getConcept(conceptId).getName().getName(), "SOMETHING NUMERIC"); 98 112 ConceptNumeric cn = cs.getConceptNumeric(conceptId); 99 assertEquals("Concept numeric absolute low values do not match", 0d, cn.getLowAbsolute());100 assertEquals("Concept nuermic high critical values do not match", 100d, cn.getHiCritical());113 assertEquals("Concept numeric absolute low values do not match", (Double)0d, cn.getLowAbsolute()); 114 assertEquals("Concept nuermic high critical values do not match", (Double)100d, cn.getHiCritical()); 101 115 assertEquals("Concept numeric datatypes does not match", "Numeric", cn.getDatatype().getName()); 102 116 assertEquals("Concept numeric classes does not match", "Question", cn.getConceptClass().getName()); … … 106 120 } 107 121 108 109 110 111 112 122 @Test 123 @NotTransactional 113 124 public void testSaveConceptSet() throws Exception { 114 125 runSyncTest(new SyncTestHelper() { … … 186 197 187 198 ConceptNumeric cn = cs.getConceptNumeric(conceptNumericId); 188 assertEquals("Concept numeric absolute low values do not match", 0d, cn.getLowAbsolute());189 assertEquals("Concept numeric critical high values do not match", 100d, cn.getHiCritical());199 assertEquals("Concept numeric absolute low values do not match", (Double)0d, cn.getLowAbsolute()); 200 assertEquals("Concept numeric critical high values do not match", (Double)100d, cn.getHiCritical()); 190 201 assertEquals("Concept numeric datatypes do not match", "Numeric", cn.getDatatype().getName()); 191 202 assertEquals("Concept numeric classes do not match", "Question", cn.getConceptClass().getName()); … … 220 231 } 221 232 222 233 @Test 234 @NotTransactional 223 235 public void testEditConcepts() throws Exception { 224 236 runSyncTest(new SyncTestHelper() { … … 248 260 Concept wt = cs.getConceptByName("WEIGHT"); 249 261 ConceptNumeric weight = cs.getConceptNumeric(wt.getConceptId()); 250 assertEquals("Failed to change property on a numeric concept", weight.getHiCritical(), 200d);262 assertEquals("Failed to change property on a numeric concept",(Double) 200d, weight.getHiCritical()); 251 263 252 264 Concept malaria = cs.getConceptByName("MALARIA"); … … 264 276 } 265 277 266 278 @Test 279 @NotTransactional 267 280 public void testAddNameToConcept() throws Exception { 268 281 runSyncTest(new SyncTestHelper() {