--- /dev/null
+package jalview.ws.dbsources;
+
+import java.io.FileInputStream;
+
+import org.junit.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import jalview.datamodel.Sequence;
+import jalview.gui.JvOptionPane;
+import jalview.ws.datamodel.alphafold.PAEContactMatrix;
+
+public class EBIAlphaFoldTest
+{
+
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
+ @DataProvider(name = "getExamplePAEfiles")
+ public Object[][] getExamplePAEfiles()
+ {
+ return new String[][] { {
+ "examples/test_fab41.result/test_fab41_predicted_aligned_error_v1.json" },
+ { "examples/AlphaFold/AF-A0A1U8FD60-F1-predicted_aligned_error_v4.json" },
+ { "examples/AlphaFold/AF-Q5VSL9-F1-predicted_aligned_error_v4.json" },
+ { "examples/AlphaFold/AF-Q5VSL9-F1-predicted_aligned_error_v4_2023.json" } ,
+ { "examples/AlphaFold/AF-Q5VSL9-F1-predicted_aligned_error_v4B.json" } };
+ }
+
+ @Test(groups = { "Functional" }, dataProvider = "getExamplePAEfiles")
+ public void checkPAEimport(String paeFile) throws Exception
+ {
+ PAEContactMatrix cm = new PAEContactMatrix(
+ new Sequence("Dummy/1-2000", "ASDASDA"),
+ EBIAlfaFold.parseJSONtoPAEContactMatrix(
+ new FileInputStream(paeFile)));
+ Assert.assertNotEquals("No data from " + paeFile, cm.getMax(), 0);
+ }
+}