Skip to content

Commit

Permalink
Added Unit Test case for checking the > (special character for >)
Browse files Browse the repository at this point in the history
  • Loading branch information
oslynn committed Dec 1, 2021
1 parent 91acbf8 commit ad20df5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions prime-router/src/test/kotlin/DocumentationTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,35 @@ $documentation
val actual = DocumentationFactory.getElementDocumentation(elemWithDocumentation)
assertThat(actual).isEqualTo(expected)
}

@Test
fun `test documentation for element with type CODE and valueSet table with special char`() {

val valueSetA = ValueSet(
"a",
ValueSet.SetSystem.HL7,
values = listOf(ValueSet.Value(">", "Above absolute high-off instrument scale"))
)

val elemWithTypeCode = Element(name = "a", type = Element.Type.CODE, valueSetRef = valueSetA)
val expected = """
**Name**: a
**Type**: CODE
**PII**: No
**Cardinality**: [0..1]
**Value Sets**
Code | Display
---- | -------
>|Above absolute high-off instrument scale
---
"""
val actual = DocumentationFactory.getElementDocumentation(elemWithTypeCode)
assertThat(actual).isEqualTo(expected)
}
}

0 comments on commit ad20df5

Please sign in to comment.