/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
for (Sequence seq : seqs)
{
- seq.setDatasetSequence(seq);
+ seq.createDatasetSequence();
expectedSeqs.put(seq.getName(), seq);
}
try
{
alignment = (Alignment) formatAdapter.readFile(TEST_JSON_FILE,
- AppletFormatAdapter.FILE, JSONFile.FILE_DESC);
+ DataSourceType.FILE, FileFormat.Json);
jf = (JSONFile) formatAdapter.getAlignFile();
AlignFrame af = new AlignFrame(alignment, jf.getHiddenSequences(),
af.getViewport().setFeaturesDisplayed(jf.getDisplayedFeatures());
formatAdapter = new AppletFormatAdapter(af.alignPanel, exportSettings);
- String jsonOutput = formatAdapter.formatSequences(JSONFile.FILE_DESC,
+ String jsonOutput = formatAdapter.formatSequences(FileFormat.Json,
af.alignPanel.getAlignment(), false);
formatAdapter = new AppletFormatAdapter();
testAlignment = formatAdapter.readFile(jsonOutput,
- AppletFormatAdapter.PASTE, JSONFile.FILE_DESC);
+ DataSourceType.PASTE, FileFormat.Json);
testJsonFile = (JSONFile) formatAdapter.getAlignFile();
// System.out.println(jsonOutput);
} catch (IOException e)
passedCount = 0;
}
- @AfterTest
+ @AfterTest(alwaysRun = true)
public void tearDown() throws Exception
{
testJsonFile = null;
Assert.assertNotNull(cs.getHiddenColumns());
List<int[]> hiddenCols = cs.getHiddenColumns();
Assert.assertEquals(hiddenCols.size(), TEST_CS_HEIGHT);
- Assert.assertEquals(hiddenCols, expectedColSel.getHiddenColumns(),
+ Assert.assertEquals(hiddenCols.get(0), expectedColSel
+ .getHiddenColumns().get(0),
"Mismatched hidden columns!");
}
{
Assert.assertNotNull(testJsonFile.getHiddenSequences(),
"Hidden sequence Expected but found Null");
- Assert.assertEquals(jf.getHiddenSequences().length, 1, "Hidden sequece");
+ Assert.assertEquals(jf.getHiddenSequences().length, 1,
+ "Hidden sequence");
}
@Test(groups = { "Functional" })
"Colourscheme is null, parsing failed!");
Assert.assertEquals(testJsonFile.getGlobalColourScheme(), "Zappo",
"Zappo colour scheme expected!");
- // Assert.assertTrue(
- // testJsonFile.getGlobalColourScheme() instanceof ZappoColourScheme,
- // "Zappo colour scheme expected!");
}
@Test(groups = { "Functional" })