Merge branch 'develop' into releases/Release_2_11_2_Branch
[jalview.git] / test / jalview / datamodel / PDBEntryTest.java
index e9d5cb2..198cde3 100644 (file)
@@ -31,15 +31,24 @@ import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
 import jalview.datamodel.PDBEntry.Type;
+import jalview.gui.JvOptionPane;
 
 //import org.testng.Assert;
 import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 public class PDBEntryTest
 {
 
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   @BeforeMethod(alwaysRun = true)
   public void setUp() throws Exception
   {
@@ -199,7 +208,7 @@ public class PDBEntryTest
     assertTrue(pdb1.updateFrom(pdb2));
     assertEquals(pdb1.getFile(), "filePath");
     assertEquals(pdb1.getType(), Type.FILE.toString());
-
+    assertEquals(pdb1.getChainCode(),"B");
     /*
      * change of file is not allowed
      */