SiftScore extends ScaledPathogenicityScore { public static SiftScore of(float score) { return new SiftScore(score); } private  SiftScore(float score); static SiftScore of(float score); @Override String toString(); static final float SIFT_THRESHOLD; }
@Test public void testGetSource() { instance = SiftScore.of(SIFT_PATHOGENIC_SCORE); assertThat(instance.getSource(), equalTo(PathogenicitySource.SIFT)); }
@Test public void testNotEqualToAnotherSiftScore() { SiftScore pathogenic = SiftScore.of(SIFT_PATHOGENIC_SCORE); SiftScore nonPathogenic = SiftScore.of(SIFT_NON_PATHOGENIC_SCORE); assertThat(nonPathogenic.equals(pathogenic), is(false)); }
@Test public void testEqualToAnotherSiftScore() { SiftScore sift = SiftScore.of(SIFT_PATHOGENIC_SCORE); SiftScore anotherPathogenic = SiftScore.of(SIFT_PATHOGENIC_SCORE); assertThat(anotherPathogenic.equals(sift), is(true)); }
@Test public void testNotEqualToAnotherPathogenicityScoreWithSameScore() { SiftScore sift = SiftScore.of(SIFT_PATHOGENIC_SCORE); PathogenicityScore poly = PolyPhenScore.of(SIFT_PATHOGENIC_SCORE); assertThat(sift.equals(poly), is(false)); }
@Test public void testCompareToAfterAgainstAnotherSiftScore() { SiftScore pathogenic = SiftScore.of(SIFT_PATHOGENIC_SCORE); SiftScore nonPathogenic = SiftScore.of(SIFT_NON_PATHOGENIC_SCORE); assertThat(pathogenic.compareTo(nonPathogenic), equalTo(MORE_PATHOGENIC)); }
@Test public void testCompareToBeforeAgainstAnotherSiftScore() { SiftScore pathogenic = SiftScore.of(SIFT_PATHOGENIC_SCORE); SiftScore nonPathogenic = SiftScore.of(SIFT_NON_PATHOGENIC_SCORE); assertThat(nonPathogenic.compareTo(pathogenic), equalTo(LESS_PATHOGENIC)); }
@Test public void testCompareToEqualsAgainstAnotherSiftScore() { SiftScore sift = SiftScore.of(SIFT_PATHOGENIC_SCORE); SiftScore equalScoreSift = SiftScore.of(SIFT_PATHOGENIC_SCORE); assertThat(sift.compareTo(equalScoreSift), equalTo(EQUALS)); }
@Test public void testCompareToAfterAgainstNullSiftScoreThrowsNullPointer() { SiftScore pathogenic = SiftScore.of(SIFT_PATHOGENIC_SCORE); assertThrows(NullPointerException.class, () -> pathogenic.compareTo(null)); }
@Test public void testCompareToAfterAnotherPathogenicityScore() { PathogenicityScore sift = SiftScore.of(0.999f); PathogenicityScore poly = PolyPhenScore.of(0.999f); assertThat(sift.compareTo(poly), equalTo(LESS_PATHOGENIC)); }
@Test public void testCompareToBeforeAnotherPathogenicityScore() { PathogenicityScore sift = SiftScore.of(0.01f); PathogenicityScore poly = MutationTasterScore.of(0.01f); assertThat(sift.compareTo(poly), equalTo(MORE_PATHOGENIC)); }
@Test public void testCompareToEqualsAnotherPathogenicityScore() { PathogenicityScore sift = SiftScore.of(0.4f); PathogenicityScore poly = PolyPhenScore.of(0.6f); assertThat(sift.compareTo(poly), equalTo(EQUALS)); }
@Test public void testAnotherPathogenicityScoreCompareToEquals() { PathogenicityScore sift = SiftScore.of(0.4f); PathogenicityScore poly = PolyPhenScore.of(0.6f); assertThat(poly.compareTo(sift), equalTo(EQUALS)); }