import javax.swing.JTextArea;
-import junit.extensions.PA;
-
import org.testng.annotations.Test;
+import junit.extensions.PA;
+
public class PairwiseAlignmentPanelTest
{
@Test(groups = "Functional")
PairwiseAlignPanel testee = new PairwiseAlignPanel(viewport);
- String text = ((JTextArea) PA.getValue(testee, "textarea")).getText();
+ String text = ((JTextArea) PA.getValue(testee, "textarea")).getText()
+ .replaceAll("\r", "");
String expected = "Score = 80.0\n" + "Length of alignment = 4\n"
+ "Sequence FER1_PEA/29-32 (Sequence length = 7)\n"
+ "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n"
PairwiseAlignPanel testee = new PairwiseAlignPanel(viewport);
- String text = ((JTextArea) PA.getValue(testee, "textarea")).getText();
+ String text = ((JTextArea) PA.getValue(testee, "textarea")).getText()
+ .replaceAll("\r", "");
String expected = "Score = 80.0\n" + "Length of alignment = 4\n"
+ "Sequence FER1_PEA/29-32 (Sequence length = 7)\n"
+ "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n"
public void testIsControlDown_mac()
{
String toolkit = Toolkit.getDefaultToolkit().getClass().getName();
- if ("sun.awt.X11.XToolkit".equals(toolkit))
+ if (toolkit.endsWith("XToolkit") || toolkit.endsWith("WToolkit"))
{
/*
* this toolkit on the build server fails these tests,
* because it returns 2, not 4, for getMenuShortcutKeyMask
+ *
+ * Same for windows, because the Platform test "mac" must match the
+ * actual platform that is running the test.
+ *
+ *
*/
return;
}