+ @DataProvider(name = "compareHeadlessAndGUIOps")
+ public Object[][] compareHeadlessAndGUIOps()
+ {
+ return new Object[][] {
+ new Object[]
+ { new String[] { "--open examples/uniref50.fa "
+ + "--structure [seqid=FER1_SPIOL,tempfac=plddt,showssannotations,structureviewer=jmol]"
+ + "examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json --image="
+ + testfiles + "test-al-pae-ss-gui.png --overwrite --gui --quit",
+ "--open examples/uniref50.fa "
+ + "--structure [seqid=FER1_SPIOL,tempfac=plddt,showssannotations,structureviewer=jmol]"
+ + "examples/AlphaFold/AF-P00221-F1-model_v4.pdb "
+ + "--paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json --image="
+ + testfiles
+ + "test-al-pae-ss-nogui.png --overwrite --nogui"
+
+ }, new String[] {
+ testfiles + "test-al-pae-ss-gui.png",
+ testfiles
+ + "test-al-pae-ss-nogui.png",
+ } } };
+ }
+
+ private static void verifyIncreasingSize(String cmdLine, String[] filenames) throws Exception
+ {
+ verifyOrderedFileSet(cmdLine, filenames, true);
+ }
+
+ private static void verifyOrderedFileSet(String cmdLine, String[] filenames, boolean increasingSize) throws Exception
+ {
+ File lastFile = null;
+ for (String filename : filenames)
+ {
+ File file = new File(filename);
+ Assert.assertTrue(file.exists(), "File '" + filename
+ + "' was not created by '" + cmdLine + "'");
+ Assert.assertTrue(file.isFile(), "File '" + filename
+ + "' is not a file from '" + cmdLine + "'");
+ Assert.assertTrue(Files.size(file.toPath()) > 0, "File '" + filename
+ + "' has no content from '" + cmdLine + "'");
+ // make sure the successive output files get bigger!
+ if (lastFile != null)
+ {
+ waitForLastWrite(file,25);
+
+ if (increasingSize)
+ { Assert.assertTrue(Files.size(file.toPath()) > Files
+ .size(lastFile.toPath()),"Expected " + file.toPath()+ " to be larger than "+lastFile.toPath());
+ } else {
+ Assert.assertEquals(Files.size(file.toPath()), Files
+ .size(lastFile.toPath()), "New file "+file.toPath()+" (actual size) not same as last file's size "+lastFile.toString());
+ }
+ }
+ // remember it for next file
+ lastFile = file;
+ }