From: gmungoc Date: Fri, 17 Feb 2017 13:30:39 +0000 (+0000) Subject: JAL-2416 score models now held in order added X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~111 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3b42127c52b4e7c7fa3b11948db8b5cc9a8a3721;p=jalview.git JAL-2416 score models now held in order added --- diff --git a/test/jalview/analysis/scoremodels/ScoreModelsTest.java b/test/jalview/analysis/scoremodels/ScoreModelsTest.java index 03c4b84..2ebbe5c 100644 --- a/test/jalview/analysis/scoremodels/ScoreModelsTest.java +++ b/test/jalview/analysis/scoremodels/ScoreModelsTest.java @@ -24,9 +24,7 @@ public class ScoreModelsTest assertTrue(models.hasNext()); /* - * models are served in alphabetical order of name - * it so happens the 3 ScoreMatrix models precede the two - * others + * models are served in order of addition */ ScoreModelI sm = models.next(); assertTrue(sm instanceof ScoreMatrix); @@ -35,20 +33,26 @@ public class ScoreModelsTest sm = models.next(); assertTrue(sm instanceof ScoreMatrix); - assertEquals(sm.getName(), "DNA"); - assertEquals(((ScoreMatrix) sm).getPairwiseScore('c', 'x'), 1f); + assertEquals(sm.getName(), "PAM250"); + assertEquals(((ScoreMatrix) sm).getPairwiseScore('R', 'C'), -4f); sm = models.next(); assertTrue(sm instanceof ScoreMatrix); - assertEquals(sm.getName(), "PAM250"); - assertEquals(((ScoreMatrix) sm).getPairwiseScore('R', 'C'), -4f); + assertEquals(sm.getName(), "Identity (SeqSpace)"); + assertEquals(((ScoreMatrix) sm).getPairwiseScore('R', 'C'), 0f); + assertEquals(((ScoreMatrix) sm).getPairwiseScore('R', 'r'), 1f); sm = models.next(); - assertFalse(sm instanceof ScoreMatrix); - assertEquals(sm.getName(), "PID"); + assertTrue(sm instanceof ScoreMatrix); + assertEquals(sm.getName(), "DNA"); + assertEquals(((ScoreMatrix) sm).getPairwiseScore('c', 'x'), 1f); sm = models.next(); assertFalse(sm instanceof ScoreMatrix); assertEquals(sm.getName(), "Sequence Feature Similarity"); + + sm = models.next(); + assertFalse(sm instanceof ScoreMatrix); + assertEquals(sm.getName(), "PID"); } }