diff --git a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/OccurrenceUtilTest.java b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/OccurrenceUtilTest.java index 0b14def68ad0e2ff369ed0a9e4a8fc3e57603b94..8d7f187dca35759f4a0ed6fd337f7624c31b8d48 100644 --- a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/OccurrenceUtilTest.java +++ b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/basic/dto/OccurrenceUtilTest.java @@ -29,7 +29,22 @@ import org.testng.annotations.Test; public class OccurrenceUtilTest extends AssertJUnit { @Test - public void test() + public void testNoCoverage() + { + check("[]", ""); + check("[]", "abc", "xx"); + check("[]", "xx"); + check("[]", "abc"); + } + + @Test + public void testFullCoverage() + { + check("[[abc@0]]", "abc", "abc"); + } + + @Test + public void testPartialAndOverlappingCoverage() { check("[[ab@0], [abcd@4], [ab@13]]", "abc abcde hahab", "ab", "bcd"); check("[[ab@0], [abcd@4], [ab@13]]", "abc abcde hahab", "ab", "cd");