View Javadoc

1   package org.ogf.saga.logicalfile;
2   
3   import org.ogf.saga.namespace.base.ReadBaseTest;
4   import org.ogf.saga.url.URL;
5   
6   import java.util.List;
7   
8   /* ***************************************************
9   * *** Centre de Calcul de l'IN2P3 - Lyon (France) ***
10  * ***             http://cc.in2p3.fr/             ***
11  * ***************************************************
12  * File:   LogicalFileReadTest
13  * Author: Sylvain Reynaud (sreynaud@in2p3.fr)
14  * Date:   2 juil. 2007
15  * ***************************************************
16  * Description:                                      */
17  /**
18   *
19   */
20  public abstract class LogicalReadTest extends ReadBaseTest {
21      protected LogicalReadTest(String protocol) throws Exception {
22          super(protocol);
23      }
24  
25      public void test_listLocations() throws Exception {
26          if (m_file instanceof LogicalFile) {
27              List<URL> locations = ((LogicalFile)m_file).listLocations();
28              assertEquals(
29                      1,
30                      locations.size());
31              assertEquals(
32                      m_physicalFileUrl.toString(),
33                      locations.get(0).toString());
34          } else {
35          	fail("Not an instance of class: LogicalFile");
36          }
37      }
38  }