use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInCriticalNumericRange_shouldReturnFalseIfHiCriticalIsNull.
@Test
public void isInCriticalNumericRange_shouldReturnFalseIfHiCriticalIsNull() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiCritical(null);
assertFalse(OpenmrsUtil.isInCriticalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isValidNumericValue_shouldReturnTrueIfHiAbsoluteIsNull.
@Test
public void isValidNumericValue_shouldReturnTrueIfHiAbsoluteIsNull() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiAbsolute(null);
assertTrue(OpenmrsUtil.isValidNumericValue(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInNormalNumericRange_shouldReturnFalseIfValueIsAboveRange.
@Test
public void isInNormalNumericRange_shouldReturnFalseIfValueIsAboveRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiNormal(4.97d);
concept.setLowNormal(3.67d);
assertFalse(OpenmrsUtil.isInNormalNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isInAbsoluteNumericRange_shouldReturnTrueIfValueIsInRange.
@Test
public void isInAbsoluteNumericRange_shouldReturnTrueIfValueIsInRange() {
ConceptNumeric concept = new ConceptNumeric();
concept.setHiAbsolute(10.34d);
concept.setLowAbsolute(3.67d);
assertTrue(OpenmrsUtil.isInAbsoluteNumericRange(5.67f, concept));
}
use of org.openmrs.ConceptNumeric in project openmrs-core by openmrs.
the class OpenmrsUtilUnitTest method isValidNumericValue_shouldReturnTrueIfLowAbsoluteIsNull.
@Test
public void isValidNumericValue_shouldReturnTrueIfLowAbsoluteIsNull() {
ConceptNumeric concept = new ConceptNumeric();
concept.setLowAbsolute(null);
assertTrue(OpenmrsUtil.isValidNumericValue(5.67f, concept));
}
Aggregations