X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FJalview2xmlTests.java;h=266b0f8b2aa42db81dedea2cd2bb02ae70192c43;hb=8b27085fa7fc5f2877e078421284c2636b85b8c6;hp=784f3dd11fc3893b22eb92b93e079303dfca2bbc;hpb=ddd696878955d609d942c4173dd66a0da9572741;p=jalview.git diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 784f3dd..266b0f8 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -120,7 +120,7 @@ public class Jalview2xmlTests String tfile = File.createTempFile("JalviewTest", ".jvp") .getAbsolutePath(); AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - inFile, FormatAdapter.FILE); + inFile, DataSourceType.FILE); assertTrue("Didn't read input file " + inFile, af != null); int olddsann = countDsAnn(af.getViewport()); assertTrue("Didn't find any dataset annotations", olddsann > 0); @@ -129,11 +129,11 @@ public class Jalview2xmlTests "Couldn't apply RNA helices colourscheme", af.getViewport().getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour); assertTrue("Failed to store as a project.", - af.saveAlignment(tfile, "Jalview")); + af.saveAlignment(tfile, FileFormat.Jalview)); af.closeMenuItem_actionPerformed(true); af = null; af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile, - FormatAdapter.FILE); + DataSourceType.FILE); assertTrue("Failed to import new project", af != null); int newdsann = countDsAnn(af.getViewport()); assertTrue( @@ -155,9 +155,9 @@ public class Jalview2xmlTests String tfile = File.createTempFile("JalviewTest", ".jvp") .getAbsolutePath(); AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - inFile, FormatAdapter.FILE); + inFile, DataSourceType.FILE); assertTrue("Didn't read input file " + inFile, af != null); - af.loadJalviewDataFile(inAnnot, FormatAdapter.FILE, null, null); + af.loadJalviewDataFile(inAnnot, DataSourceType.FILE, null, null); assertTrue( "Didn't set T-coffee colourscheme", af.getViewport().getGlobalColourScheme().getClass() @@ -170,11 +170,11 @@ public class Jalview2xmlTests .getViewport().getGlobalColourScheme())) != null); assertTrue("Failed to store as a project.", - af.saveAlignment(tfile, "Jalview")); + af.saveAlignment(tfile, FileFormat.Jalview)); af.closeMenuItem_actionPerformed(true); af = null; af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile, - FormatAdapter.FILE); + DataSourceType.FILE); assertTrue("Failed to import new project", af != null); assertTrue( "Didn't set T-coffee colourscheme for imported project.", @@ -191,9 +191,9 @@ public class Jalview2xmlTests String tfile = File.createTempFile("JalviewTest", ".jvp") .getAbsolutePath(); AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - inFile, FormatAdapter.FILE); + inFile, DataSourceType.FILE); assertTrue("Didn't read input file " + inFile, af != null); - af.loadJalviewDataFile(inAnnot, FormatAdapter.FILE, null, null); + af.loadJalviewDataFile(inAnnot, DataSourceType.FILE, null, null); AlignmentAnnotation[] aa = af.getViewport().getAlignment() .getSequenceAt(0).getAnnotation("IUPredWS (Short)"); assertTrue( @@ -215,11 +215,11 @@ public class Jalview2xmlTests sg.addSequence(af.getViewport().getAlignment().getSequenceAt(2), true); af.alignPanel.alignmentChanged(); assertTrue("Failed to store as a project.", - af.saveAlignment(tfile, "Jalview")); + af.saveAlignment(tfile, FileFormat.Jalview)); af.closeMenuItem_actionPerformed(true); af = null; af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile, - FormatAdapter.FILE); + DataSourceType.FILE); assertTrue("Failed to import new project", af != null); // check for group and alignment colourschemes @@ -276,7 +276,7 @@ public class Jalview2xmlTests int origCount = Desktop.getAlignFrames() == null ? 0 : Desktop .getAlignFrames().length; AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - "examples/exampleFile_2_7.jar", FormatAdapter.FILE); + "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); assertTrue("Didn't gather the views in the example file.", Desktop.getAlignFrames().length == 1 + origCount); @@ -292,7 +292,7 @@ public class Jalview2xmlTests StructureImportSettings.setProcessSecondaryStructure(true); StructureImportSettings.setVisibleChainAnnotation(true); AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - "examples/exampleFile_2_7.jar", FormatAdapter.FILE); + "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); AlignmentViewPanel sps = null; for (AlignmentViewPanel ap : af.alignPanel.alignFrame.getAlignPanels()) @@ -351,7 +351,7 @@ public class Jalview2xmlTests public void testCopyViewSettings() throws Exception { AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - "examples/exampleFile_2_7.jar", FormatAdapter.FILE); + "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); AlignmentViewPanel sps = null, groups = null; for (AlignmentViewPanel ap : af.alignPanel.alignFrame.getAlignPanels()) @@ -391,7 +391,7 @@ public class Jalview2xmlTests Desktop.instance.closeAll_actionPerformed(null); AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - "examples/exampleFile_2_7.jar", FormatAdapter.FILE); + "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); Assert.assertEquals(Desktop.getAlignFrames().length, 1); String afid = af.getViewport().getSequenceSetId(); @@ -424,7 +424,7 @@ public class Jalview2xmlTests Assert.assertEquals(Desktop.getAlignFrames().length, 0); } af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - tfile.getAbsolutePath(), FormatAdapter.FILE); + tfile.getAbsolutePath(), DataSourceType.FILE); Assert.assertNotNull(af); Assert.assertEquals( Desktop.getAlignFrames().length, @@ -445,7 +445,7 @@ public class Jalview2xmlTests { Desktop.instance.closeAll_actionPerformed(null); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( - "examples/exampleFile_2_7.jar", FormatAdapter.FILE); + "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); String afid = af.getViewport().getSequenceSetId(); @@ -489,7 +489,7 @@ public class Jalview2xmlTests } af = new FileLoader().LoadFileWaitTillLoaded( - tfile.getAbsolutePath(), FormatAdapter.FILE); + tfile.getAbsolutePath(), DataSourceType.FILE); afid = af.getViewport().getSequenceSetId(); for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid)) @@ -578,7 +578,7 @@ public class Jalview2xmlTests { Desktop.instance.closeAll_actionPerformed(null); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( - "examples/uniref50.fa", FormatAdapter.FILE); + "examples/uniref50.fa", DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); String afid = af.getViewport().getSequenceSetId(); // make a second view of the alignment @@ -658,7 +658,7 @@ public class Jalview2xmlTests } af = new FileLoader().LoadFileWaitTillLoaded( - tfile.getAbsolutePath(), FormatAdapter.FILE); + tfile.getAbsolutePath(), DataSourceType.FILE); afid = af.getViewport().getSequenceSetId(); for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid)) @@ -700,7 +700,7 @@ public class Jalview2xmlTests Desktop.instance.closeAll_actionPerformed(null); String exampleFile = "examples/3W5V.pdb"; AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(exampleFile, - FormatAdapter.FILE); + DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); String afid = af.getViewport().getSequenceSetId(); @@ -749,7 +749,7 @@ public class Jalview2xmlTests } AlignFrame restoredFrame = new FileLoader().LoadFileWaitTillLoaded( - tfile.getAbsolutePath(), FormatAdapter.FILE); + tfile.getAbsolutePath(), DataSourceType.FILE); String rfid = restoredFrame.getViewport().getSequenceSetId(); AlignmentPanel[] rAlignPanels = Desktop.getAlignmentPanels(rfid); AlignmentViewPanel rap = rAlignPanels[0];