* Setup creates an annotation over 11 columns with values 0-10 and threshold
* 5
*/
- @BeforeClass
+ @BeforeClass(alwaysRun = true)
public void setUp()
{
Annotation[] anns = new Annotation[WIDTH];
anns[col] = new Annotation("a", "a", 'a', col, colour);
}
- seq = new Sequence("", "");
+ seq = new Sequence("Seq", "");
al = new Alignment(new SequenceI[]{ seq});
/*
Color result = testee.shadeCalculation(ann, col);
assertEquals(result, expected, "for column " + col);
}
+
+ /*
+ * test for boundary case threshold == graphMax (JAL-3206)
+ */
+ float thresh = ann.threshold.value;
+ ann.threshold.value = ann.graphMax;
+ Color result = testee.shadeCalculation(ann, WIDTH - 1);
+ assertEquals(result, maxColour);
+ testee.setThresholdIsMinMax(false);
+ result = testee.shadeCalculation(ann, WIDTH - 1);
+ assertEquals(result, maxColour);
+ ann.threshold.value = thresh; // reset
}
/**
Color result = testee.shadeCalculation(ann, col);
assertEquals(result, expected, "for column " + col);
}
+
+ /*
+ * test for boundary case threshold == graphMin (JAL-3206)
+ */
+ float thresh = ann.threshold.value;
+ ann.threshold.value = ann.graphMin;
+ Color result = testee.shadeCalculation(ann, 0);
+ assertEquals(result, minColour);
+ testee.setThresholdIsMinMax(false);
+ result = testee.shadeCalculation(ann, 0);
+ assertEquals(result, minColour);
+ ann.threshold.value = thresh; // reset
}
/**