DiseaseInheritanceCache implements ResourceParser { public InheritanceMode getInheritanceMode(Integer diseaseId) { return diseaseInheritanceModeMap.getOrDefault(diseaseId, InheritanceMode.UNKNOWN); } DiseaseInheritanceCache(); @Override void parseResource(Resource resource, Path inDir, Path outDir); InheritanceMode getInheritanceMode(Integer diseaseId); boolean isEmpty();  }
@Test public void testGetInheritanceCodeUnknownOrphanet() { Integer phenID = 36237; InheritanceMode expResult = InheritanceMode.UNKNOWN; InheritanceMode result = instance.getInheritanceMode(phenID); assertThat(result, equalTo(expResult)); }
@Test public void testGetInheritanceCodeBoth() { Integer phenID = 100300; InheritanceMode expResult = InheritanceMode.AUTOSOMAL_DOMINANT_AND_RECESSIVE; InheritanceMode result = instance.getInheritanceMode(phenID); assertThat(result, equalTo(expResult)); }
@Test public void testGetInheritanceCodeRecessive() { Integer phenID = 100100; InheritanceMode expResult = InheritanceMode.AUTOSOMAL_RECESSIVE; InheritanceMode result = instance.getInheritanceMode(phenID); assertThat(result, equalTo(expResult)); }
@Test public void testGetInheritanceCodeDominant() { Integer phenID = 100200; InheritanceMode expResult = InheritanceMode.AUTOSOMAL_DOMINANT; InheritanceMode result = instance.getInheritanceMode(phenID); assertThat(result, equalTo(expResult)); }
@Test public void testGetInheritanceCodeUnknownDisease() { Integer phenID = 000000; InheritanceMode expResult = InheritanceMode.UNKNOWN; InheritanceMode result = instance.getInheritanceMode(phenID); assertThat(result, equalTo(expResult)); }
@Test public void testGetInheritanceCodeMitochondrial() { Integer phenID = 560000; InheritanceMode expResult = InheritanceMode.MITOCHONDRIAL; InheritanceMode result = instance.getInheritanceMode(phenID); assertThat(result, equalTo(expResult)); }