JAL-1432 updated copyright notices
[jalview.git] / test / jalview / ws / jabaws / JalviewJabawsTestUtils.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.ws.jabaws;
20
21 import static org.junit.Assert.*;
22 import jalview.ws.jws2.Jws2Discoverer;
23
24 import java.util.Vector;
25
26 import org.junit.AfterClass;
27 import org.junit.BeforeClass;
28 import org.junit.Test;
29
30 public class JalviewJabawsTestUtils
31 {
32   
33   @BeforeClass
34   public static void setUpBeforeClass() throws Exception
35   {
36   }
37
38   @AfterClass
39   public static void tearDownAfterClass() throws Exception
40   {
41   }
42
43   /**
44    * test servers
45    */
46   public static String[] serviceUrls = new String[]
47   { "http://localhost:8080/jabaws" };
48
49   @Test
50   public void testAnnotExport()
51   {
52     fail("Not yet implemented");
53   }
54
55   public static jalview.ws.jws2.Jws2Discoverer getJabawsDiscoverer() {
56     jalview.ws.jws2.Jws2Discoverer disc = jalview.ws.jws2.Jws2Discoverer
57             .getDiscoverer();
58     int p = 0;
59     String svcurls="";
60     Vector<String> services = new Vector<String>();
61     for (String url : JalviewJabawsTestUtils.serviceUrls)
62     {
63       svcurls+=url+"; ";
64       services.add(url);
65     }
66     ;
67     Jws2Discoverer.setServiceUrls(services);
68   
69     try
70     {
71       disc.run();
72     } catch (Exception e)
73     {
74       e.printStackTrace();
75       fail("Aborting. Problem discovering services. Tried "+svcurls);
76     }
77     assertTrue("Failed to discover any services at ",
78             disc.getServices().size() > 0);
79     return disc;
80   }
81
82 }