X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Ffts%2Fcore%2FFTSRestClientTest.java;h=2e9a5f45c3076bb812decc2bf1eb160f4f90077c;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=b751b7745d1c9e395e1eeb541cd30a9cdd0a92e7;hpb=604cbee405a837565ba1a74aa9bddd62aed685ab;p=jalview.git diff --git a/test/jalview/fts/core/FTSRestClientTest.java b/test/jalview/fts/core/FTSRestClientTest.java index b751b77..2e9a5f4 100644 --- a/test/jalview/fts/core/FTSRestClientTest.java +++ b/test/jalview/fts/core/FTSRestClientTest.java @@ -22,17 +22,27 @@ package jalview.fts.core; import jalview.fts.api.FTSDataColumnI; import jalview.fts.api.FTSDataColumnI.FTSDataColumnGroupI; +import jalview.gui.JvOptionPane; import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.testng.Assert; +import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class FTSRestClientTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + private FTSRestClient ftsRestClient; @BeforeMethod(alwaysRun = true) @@ -68,8 +78,8 @@ public class FTSRestClientTest foundIndex = ftsRestClient.getPrimaryKeyColumIndex(wantedFields, false); Assert.assertEquals(foundIndex, 0); - foundIndex = ftsRestClient - .getPrimaryKeyColumIndex(wantedFields, true); + foundIndex = ftsRestClient.getPrimaryKeyColumIndex(wantedFields, + true); Assert.assertEquals(foundIndex, 1); } catch (Exception e) { @@ -81,12 +91,12 @@ public class FTSRestClientTest @Test(groups = { "Functional" }) public void getAllDefaulDisplayedDataColumns() { - Assert.assertNotNull(ftsRestClient - .getAllDefaultDisplayedFTSDataColumns()); + Assert.assertNotNull( + ftsRestClient.getAllDefaultDisplayedFTSDataColumns()); Assert.assertTrue(!ftsRestClient.getAllDefaultDisplayedFTSDataColumns() .isEmpty()); - Assert.assertEquals(ftsRestClient - .getAllDefaultDisplayedFTSDataColumns().size(), 7); + Assert.assertEquals( + ftsRestClient.getAllDefaultDisplayedFTSDataColumns().size(), 7); } @Test(groups = { "Functional" }) @@ -277,8 +287,8 @@ public class FTSRestClientTest actualGroupStr = ftsRestClient.getDataColumnGroupById("g4") .toString(); Assert.assertEquals(actualGroupStr, "Procedures & Softwares"); - actualGroupStr = ftsRestClient.getDataColumnGroupById( - "unavailable group").toString(); + actualGroupStr = ftsRestClient + .getDataColumnGroupById("unavailable group").toString(); } catch (Exception e) { Assert.assertTrue(true);