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
15
16
17
18
19
20
21
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 }