View Javadoc

1   package org.ogf.saga.job;
2   
3   import org.junit.Test;
4   import org.ogf.saga.JSAGABaseTest;
5   import org.ogf.saga.session.Session;
6   import org.ogf.saga.session.SessionFactory;
7   import org.ogf.saga.url.URL;
8   import org.ogf.saga.url.URLFactory;
9   
10  import java.util.Iterator;
11  import java.util.List;
12  
13  /* ***************************************************
14  * *** Centre de Calcul de l'IN2P3 - Lyon (France) ***
15  * ***             http://cc.in2p3.fr/             ***
16  * ***************************************************
17  * File:   JobListTest
18  * Author: Sylvain Reynaud (sreynaud@in2p3.fr)
19  * Date:   30 janv. 2009
20  * ***************************************************
21  * Description:                                      */
22  /**
23   *
24   */
25  public abstract class ListTest extends JSAGABaseTest {
26      protected Session m_session;
27      protected URL m_url;
28  
29      protected ListTest(String jobprotocol) throws Exception {
30          super();
31          m_session = SessionFactory.createSession(true);
32          m_url = URLFactory.createURL(getRequiredProperty(jobprotocol, CONFIG_JOBSERVICE_URL));
33      }
34  
35      @Test
36      public void test_list() throws Exception {
37          JobService service = JobFactory.createJobService(m_session, m_url);
38          List<String> list = service.list();
39          for (Iterator it=list.iterator(); it.hasNext(); ) {
40              System.out.println(it.next());
41          }
42      }
43  }