View Javadoc

1   package net.sourceforge.pmd.util.database;
2   
3   import java.net.URI;
4   import java.net.URISyntaxException;
5   import java.util.Arrays;
6   import java.util.HashMap;
7   import java.util.List;
8   import java.util.Map;
9   import static junit.framework.Assert.assertEquals;
10  import junit.framework.Test;
11  import junit.framework.TestCase;
12  import junit.framework.TestSuite;
13  
14  /**
15   *
16   * @author sturton
17   */
18  public class DBURITest extends TestCase {
19   
20    /**
21     * URI with minimum information, relying on defaults in testdefaults.properties
22     */
23    final static String C_TEST_DEFAULTS = "jdbc:oracle:testdefault://192.168.100.21:1521/ORCL";
24  
25    /*
26     * Expected values from testdefaults.properties 
27     */
28    final static String C_DEFAULT_USER = "scott";
29    final static String C_DEFAULT_PASSWORD = "tiger";
30    final static String C_DEFAULT_LANGUAGES = "java,plsql";
31    final static String C_DEFAULT_SCHEMAS = "scott,system";
32    final static String C_DEFAULT_SOURCE_CODE_TYPES = "table,view";
33    final static String C_DEFAULT_SOURCE_CODE_NAMES = "emp,dept";
34    final static String C_DEFAULT_CHARACTERSET = "utf8";
35    
36    /**
37     * Fully specified URI, overriding defaults in testdefaults.properties
38     */
39    final static String C_TEST_EXPLICIT = "jdbc:oracle:testdefault:system/oracle@//192.168.100.21:1521/ORCL?characterset=us7ascii&schemas=scott,hr,sh,system&sourcecodetypes=procedures,functions,triggers,package,types&languages=plsql,java&sourcecodenames=PKG_%25%25,PRC_%25%25";
40  
41    /*
42     * Expected values from testdefaults.properties, with values overridden by URI query parameters 
43     */
44    final static String C_EXPLICIT_USER = "system";
45    final static String C_EXPLICIT_PASSWORD = "oracle";
46    final static String C_EXPLICIT_LANGUAGES = "plsql,java";
47    final static String C_EXPLICIT_SCHEMAS = "scott,hr,sh,system";
48    final static String C_EXPLICIT_SOURCE_CODE_TYPES = "procedures,functions,triggers,package,types";
49    final static String C_EXPLICIT_SOURCE_CODE_NAMES = "PKG_%%,PRC_%%";
50    final static String C_EXPLICIT_CHARACTERSET = "us7ascii";
51    
52    final static String C_TEST_URI = "test?param1=x%261&param2=&param3=";
53    final static String C_ORACLE_OCI_1 = "jdbc:oracle:oci:system/oracle@//192.168.100.21:1521/ORCL";
54    final static String C_ORACLE_OCI_2 = "jdbc:oracle:oci:system/oracle@//192.168.100.21:1521/ORCL?characterset=utf8&schemas=scott,hr,sh,system&sourcecodetypes=procedures,functions,triggers,package,types&languages=plsql,java";
55    final static String C_ORACLE_OCI_3 = "jdbc:oracle:oci:system/oracle@//myserver.com:1521/customer_db?characterset=utf8&schemas=scott,hr,sh,system&sourcecodetypes=procedures,functions,triggers,package,types&languages=plsql,java&sourcecodenames=PKG_%25%25,PRC_%25%25";
56  
57    final static String C_ORACLE_THIN_1 = "jdbc:oracle:thin:system/oracle@//192.168.100.21:1521/ORCL";
58    final static String C_ORACLE_THIN_2 = "jdbc:oracle:thin:system/oracle@//192.168.100.21:1521/ORCL?characterset=utf8&schemas=scott,hr,sh,system&sourcecodetypes=procedures,functions,triggers,package,types&languages=plsql,java";
59    final static String C_ORACLE_THIN_3 = "jdbc:oracle:thin:system/oracle@//myserver.com:1521/customer_db?characterset=utf8&schemas=scott,hr,sh,system&sourcecodetypes=procedures,functions,triggers,package,types&languages=plsql,java&sourcecodenames=PKG_%25%25,PRC_%25%25";
60  
61    final static String C_POSTGRES_1 = "jdbc:postgresql://host/database";
62    final static String C_HTTP = "http://localhost:80?characterset=utf8&schemas=scott,hr,sh,system&sourcecodetypes=procedures,functions,triggers,package,types&languages=plsql,java";
63  
64    static void dump(String description , URI dburi) {
65      System.err.printf("Test %s\n: isOpaque=%s, isAbsolute=%s Scheme=%s,\n SchemeSpecificPart=%s,\n Host=%s,\n Port=%s,\n Path=%s,\n Fragment=%s,\n Query=%s\n"
66                       , description
67                       , dburi.isOpaque()
68                       , dburi.isAbsolute()
69                       , dburi.getScheme()
70                       , dburi.getSchemeSpecificPart()
71                       , dburi.getHost()
72                       , dburi.getPort()
73                       , dburi.getPath()
74                       , dburi.getFragment()
75                       , dburi.getQuery()
76                       );
77      String query = dburi.getQuery();
78      if (null != query && !query.equals(""))
79      {
80        String[] params = query.split("&");  
81        Map<String, String> map = new HashMap<String, String>();  
82        for (String param : params)  
83        {  
84            String[] splits = param.split("=");  
85            String name =splits[0];
86            String value = null ;
87            if (splits.length > 1 ) 
88            {
89              value = splits[1] ;
90            }  
91            map.put(name, value);  
92            System.err.printf("name=%s,value=%s\n",name,value);
93        }  
94      }
95      //return map;  
96    }
97   
98    public DBURITest(String testName) {
99      super(testName);
100   }
101 
102   public static Test suite() {
103     TestSuite suite = new TestSuite(DBURITest.class);
104     return suite;
105   }
106   
107   @Override
108   protected void setUp() throws Exception {
109     super.setUp();
110   }
111   
112   @Override
113   protected void tearDown() throws Exception {
114     super.tearDown();
115   }
116 
117   /**
118    * Test of dump method, of class DBURI.
119    */
120   public void testDump() throws URISyntaxException, Exception {
121     System.out.println("dump");
122     String description = "";
123     DBURI dburi = new DBURI(C_TEST_URI) ; 
124     DBURI.dump(description, dburi.getUri());
125     // TODO review the generated test code and remove the default call to fail.
126     //fail("The test case is a prototype.");
127   }
128 
129   /**
130    * Test of getUri method, of class DBURI.
131    */
132   public void testGetUri() throws URISyntaxException, Exception {
133     System.out.println("getUri");
134     DBURI instance = new DBURI(C_ORACLE_OCI_1) ; 
135     URI expResult = new URI(C_ORACLE_OCI_1) ; 
136     URI result = instance.getUri();
137     assertEquals(expResult, result);
138     // TODO review the generated test code and remove the default call to fail.
139     //fail("The test case is a prototype.");
140   }
141 
142   /**
143    * Test of setUri method, of class DBURI.
144    */
145   public void testSetUri() throws URISyntaxException, Exception {
146     System.out.println("setUri");
147     URI uri = new URI(C_ORACLE_OCI_1) ;
148     DBURI instance = new DBURI(C_TEST_URI) ;
149     instance.setUri(uri);
150     assertEquals(uri, instance.getUri());
151     // TODO review the generated test code and remove the default call to fail.
152     //fail("The test case is a prototype.");
153   }
154 
155   /**
156    * Test of getDbType method, of class DBURI.
157    */
158   public void testGetDbType() throws URISyntaxException, Exception {
159     System.out.println("getDbType");
160     DBURI instance = new DBURI(C_POSTGRES_1);
161     DBType expResult = new DBType("postgresql");
162     DBType result = instance.getDbType();
163     //assertEquals(expResult, result);
164     // TODO review the generated test code and remove the default call to fail.
165     //fail("The test case is a prototype.");
166   }
167 
168   /**
169    * Test of getDbType method, of class DBURI.
170    */
171   public void testGetDbType2() throws URISyntaxException, Exception {
172     System.out.println("getDbType");
173     DBURI instance = new DBURI(C_ORACLE_OCI_1);
174     DBType expResult = new DBType("oci");
175     DBType result = instance.getDbType();
176     //assertEquals(expResult, result);
177     // TODO review the generated test code and remove the default call to fail.
178     //fail("The test case is a prototype.");
179   }
180 
181   /**
182    * Test of setDbType method, of class DBURI.
183    */
184   public void testSetDbType() throws URISyntaxException, Exception {
185     System.out.println("setDbType");
186     DBURI instance = new DBURI(C_ORACLE_OCI_2);
187     DBType dbType = new DBType("postgresql");
188     instance.setDbType(dbType);
189     assertEquals(dbType, instance.getDbType());
190     // TODO review the generated test code and remove the default call to fail.
191     //fail("The test case is a prototype.");
192   }
193 
194   /**
195    * Test of getSchemasList method, of class DBURI.
196    */
197   public void testGetSchemasList() throws URISyntaxException, Exception {
198     System.out.println("getSchemasList");
199     DBURI instance = new DBURI(C_ORACLE_OCI_2);
200     List expResult;
201     expResult = Arrays.asList("scott,hr,sh,system".split(","));
202     List result = instance.getSchemasList();
203     assertEquals(expResult, result);
204     // TODO review the generated test code and remove the default call to fail.
205     //fail("The test case is a prototype.");
206   }
207 
208   /**
209    * Test of setSchemasList method, of class DBURI.
210    */
211   public void testSetSchemasList() throws URISyntaxException, Exception {
212     System.out.println("setSchemasList");
213     List<String> schemasList = Arrays.asList("scott,hr,sh,system".split(","));
214     DBURI instance =  new DBURI(C_ORACLE_OCI_1);
215     instance.setSchemasList(schemasList);
216     // TODO review the generated test code and remove the default call to fail.
217     //fail("The test case is a prototype.");
218   }
219 
220   /**
221    * Test of getSourceCodeTypesList method, of class DBURI.
222    */
223   public void testGetSourceCodeTypesList() throws URISyntaxException, Exception {
224     System.out.println("getSourceCodeTypesList");
225     DBURI instance = new DBURI(C_ORACLE_OCI_2);
226     List expResult = Arrays.asList("procedures,functions,triggers,package,types".split(","));
227     List result = instance.getSourceCodeTypesList();
228     assertEquals(expResult, result);
229     // TODO review the generated test code and remove the default call to fail.
230     //fail("The test case is a prototype.");
231   }
232 
233   /**
234    * Test of setSourceCodeTypesList method, of class DBURI.
235    */
236   public void testSetSourceCodeTypesList() throws URISyntaxException, Exception {
237     System.out.println("setSourceCodeTypesList");
238     List<String> sourcecodetypesList = Arrays.asList("procedures,functions,triggers,package,types".split(","));
239     DBURI instance = new DBURI(C_ORACLE_OCI_1);
240     instance.setSourceCodeTypesList(sourcecodetypesList);
241     // TODO review the generated test code and remove the default call to fail.
242     //fail("The test case is a prototype.");
243   }
244 
245   /**
246    * Test of getSourceCodeNamesList method, of class DBURI.
247    */
248   public void testGetSourceCodeNamesList() throws URISyntaxException, Exception {
249     System.out.println("getSourceCodeNamesList");
250     DBURI instance = new DBURI(C_ORACLE_OCI_3);
251     List expResult = Arrays.asList("PKG_%%,PRC_%%".split(","));
252     List result = instance.getSourceCodeNamesList();
253     assertEquals(expResult, result);
254     // TODO review the generated test code and remove the default call to fail.
255     //fail("The test case is a prototype.");
256   }
257 
258   /**
259    * Test of setSourceCodeNamesList method, of class DBURI.
260    */
261   public void testSetSourceCodeNamesList() throws URISyntaxException, Exception {
262     System.out.println("setSourceCodeNamesList");
263     List<String> sourceCodeNamesList = Arrays.asList("PKG_%%,TRG_%%".split(","));
264     DBURI instance = new DBURI(C_ORACLE_OCI_2);
265     instance.setSourceCodeNamesList(sourceCodeNamesList);
266     // TODO review the generated test code and remove the default call to fail.
267     //fail("The test case is a prototype.");
268   }
269 
270   /**
271    * Test of getLanguagesList method, of class DBURI.
272    */
273   public void testGetLanguagesList() throws URISyntaxException, Exception {
274     System.out.println("getLanguagesList");
275     DBURI instance = new DBURI(C_ORACLE_OCI_2);
276     List expResult = Arrays.asList("plsql,java".split(","));
277     List result = instance.getLanguagesList();
278     assertEquals(expResult, result);
279     // TODO review the generated test code and remove the default call to fail.
280     //fail("The test case is a prototype.");
281   }
282 
283   /**
284    * Test of setLanguagesList method, of class DBURI.
285    */
286   public void testSetLanguagesList() throws URISyntaxException, Exception {
287     System.out.println("setLanguagesList");
288     List<String> languagesList = Arrays.asList("plsql,java".split(","));
289     DBURI instance = new DBURI(C_ORACLE_OCI_2);
290     instance.setLanguagesList(languagesList);
291     // TODO review the generated test code and remove the default call to fail.
292     //fail("The test case is a prototype.");
293   }
294 
295   /**
296    * Test of getDriverClass method, of class DBURI.
297    */
298   public void testGetDriverClass() throws URISyntaxException, Exception {
299     System.out.println("getDriverClass");
300     DBURI instance = new DBURI(C_ORACLE_OCI_1);
301     String expResult = "oracle.jdbc.OracleDriver";
302     String result = instance.getDriverClass();
303     System.out.println("testGetDriverClass: driverClass="+result);
304     assertEquals(expResult, result);
305     // TODO review the generated test code and remove the default call to fail.
306     //fail("The test case is a prototype.");
307   }
308 
309 
310   /**
311    * Test of getDriverClass method, of class DBURI.
312    */
313   public void testGetThinDriverClass() throws URISyntaxException, Exception {
314     System.out.println("getThinDriverClass");
315     DBURI instance = new DBURI(C_ORACLE_THIN_1);
316     String expResult = "oracle.jdbc.OracleDriver";
317     String result = instance.getDriverClass();
318     System.out.println("testGetThinDriverClass: driverClass="+result);
319     System.out.println("testGetThinDriverClass: getDbType().getProperties() follows");
320     System.out.println("testGetThinDriverClass: getDbType().getProperties()="+instance.getDbType().getProperties());
321     assertEquals(expResult, result);
322     // TODO review the generated test code and remove the default call to fail.
323     //fail("The test case is a prototype.");
324   }
325 
326   /**
327    * Test of setDriverClass method, of class DBURI.
328    */
329   public void testSetDriverClass() throws URISyntaxException, Exception {
330     System.out.println("setDriverClass");
331     String driverClass = "oracle.jdbc.driver.OracleDriver";
332     DBURI instance = new DBURI(C_ORACLE_OCI_1);
333     instance.setDriverClass(driverClass);
334     // TODO review the generated test code and remove the default call to fail.
335     //fail("The test case is a prototype.");
336   }
337 
338   /**
339    * Test of getCharacterSet method, of class DBURI.
340    */
341   public void testGetCharacterSet() throws URISyntaxException, Exception {
342     System.out.println("getCharacterSet");
343     DBURI instance = new DBURI(C_ORACLE_OCI_2);
344     String expResult = "utf8";
345     String result = instance.getCharacterSet();
346     assertEquals(expResult, result);
347     // TODO review the generated test code and remove the default call to fail.
348     //fail("The test case is a prototype.");
349   }
350 
351   /**
352    * Test of setCharacterSet method, of class DBURI.
353    */
354   public void testSetCharacterSet() throws URISyntaxException, Exception {
355     System.out.println("setCharacterSet");
356     String characterSet = "utf8";
357     DBURI instance = new DBURI(C_POSTGRES_1);
358     instance.setCharacterSet(characterSet);
359     // TODO review the generated test code and remove the default call to fail.
360     //fail("The test case is a prototype.");
361   }
362 
363   /**
364    * Test of getSourceCodeType method, of class DBURI.
365    */
366   public void testGetSourceCodeType() throws URISyntaxException, Exception {
367     System.out.println("getSourceCodeType");
368     DBURI instance = new DBURI(C_ORACLE_OCI_1);
369     int expResult = 2005; //CLOB
370     int result = instance.getSourceCodeType();
371     assertEquals(expResult, result);
372     // TODO review the generated test code and remove the default call to fail.
373     //fail("The test case is a prototype.");
374   }
375 
376   /**
377    * Test of setSourceCodeType method, of class DBURI.
378    */
379   public void testSetSourceCodeType() throws URISyntaxException, Exception {
380     System.out.println("setSourceCodeType");
381     int sourceCodeType = 5;
382     DBURI instance = new DBURI(C_ORACLE_OCI_1);
383     instance.setSourceCodeType(sourceCodeType);
384     // TODO review the generated test code and remove the default call to fail.
385     //fail("The test case is a prototype.");
386   }
387 
388   /**
389    * Test of getSubprotocol method, of class DBURI.
390    */
391   public void testGetSubprotocol() throws URISyntaxException, Exception {
392     System.out.println("getSubprotocol");
393     DBURI instance = new DBURI(C_ORACLE_OCI_2);
394     String expResult = "oracle";
395     String result = instance.getSubprotocol();
396     assertEquals(expResult, result);
397     // TODO review the generated test code and remove the default call to fail.
398     //fail("The test case is a prototype.");
399   }
400 
401   /**
402    * Test of setSubprotocol method, of class DBURI.
403    */
404   public void testSetSubprotocol() throws URISyntaxException, Exception {
405     System.out.println("setSubprotocol");
406     DBURI instance = new DBURI(C_ORACLE_OCI_2);
407     String subprotocol = "oracle";
408     instance.setSubprotocol(subprotocol);
409     String result = instance.getSubprotocol();
410     assertEquals(subprotocol, result);
411     // TODO review the generated test code and remove the default call to fail.
412     //fail("The test case is a prototype.");
413   }
414 
415   /**
416    * Test of getSubnamePrefix method, of class DBURI.
417    */
418   public void testGetSubnamePrefix() throws URISyntaxException, Exception {
419     System.out.println("getSubnamePrefix");
420     DBURI instance = new DBURI(C_ORACLE_OCI_2);
421     String expResult = "oci";
422     String result = instance.getSubnamePrefix();
423     assertEquals(expResult, result);
424     // TODO review the generated test code and remove the default call to fail.
425     //fail("The test case is a prototype.");
426   }
427 
428   /**
429    * Test of setSubnamePrefix method, of class DBURI.
430    */
431   public void testSetSubnamePrefix() throws URISyntaxException, Exception {
432     System.out.println("setSubnamePrefix");
433     String subnamePrefix = "oci8";
434     DBURI instance = new DBURI(C_ORACLE_OCI_2);
435     instance.setSubnamePrefix(subnamePrefix);
436     String result = instance.getSubnamePrefix();
437     assertEquals(subnamePrefix , result);
438     // TODO review the generated test code and remove the default call to fail.
439     //fail("The test case is a prototype.");
440   }
441 
442   /**
443    * Test of getParameters method, of class DBURI.
444    */
445   public void testGetParameters() throws URISyntaxException, Exception {
446     System.out.println("getParameters");
447     DBURI instance = new DBURI(C_TEST_URI);
448     Map expResult = new HashMap<String,String>();
449     expResult.put("param1","x&1");
450     expResult.put("param2",null);
451     expResult.put("param3", null);
452     Map result = instance.getParameters();
453     assertEquals(expResult, result);
454     // TODO review the generated test code and remove the default call to fail.
455     //fail("The test case is a prototype.");
456   }
457 
458   /**
459    * Test of setParameters method, of class DBURI.
460    */
461   public void testSetParameters() throws URISyntaxException, Exception {
462     System.out.println("setParameters");
463     Map<String, String> parameters = new HashMap<String,String>();
464     parameters.put("param1","x%FFF");
465     parameters.put("param2","IAmParameter2");
466     parameters.put("param3", "IAmParameter3");
467     DBURI instance = new DBURI(C_TEST_URI);
468     instance.setParameters(parameters);
469     // TODO review the generated test code and remove the default call to fail.
470     assertEquals(parameters, instance.getParameters());
471   }
472   
473 
474   /**
475    * Verify that default languages are returned if non are provided in the DBURI.
476    */
477   public void testDefaultLanguagesList() throws URISyntaxException, Exception {
478     System.out.println("testDefaultLanguagesList");
479 
480     List<String> defaultLanguagesList  = Arrays.asList(C_DEFAULT_LANGUAGES.split(","));
481 
482     DBURI instance = new DBURI(C_TEST_DEFAULTS);
483     List<String> result = instance.getLanguagesList() ;
484     assertEquals(defaultLanguagesList, result);
485     // TODO review the generated test code and remove the default call to fail.
486     //fail("The test case is a prototype.");
487   }
488   
489 
490   /**
491    * Verify that default CharacterSet are returned if non are provided in the DBURI.
492    */
493   public void testDefaultCharacterSet() throws URISyntaxException, Exception {
494     System.out.println("testDefaultCharacterSet");
495 
496     DBURI instance = new DBURI(C_TEST_DEFAULTS);
497     String result = instance.getCharacterSet();
498     assertEquals(C_DEFAULT_CHARACTERSET, result);
499     // TODO review the generated test code and remove the default call to fail.
500     //fail("The test case is a prototype.");
501   }
502   
503 
504   /**
505    * Verify that default languages are returned if non are provided in the DBURI.
506    */
507   public void testDefaultSchemasList() throws URISyntaxException, Exception {
508     System.out.println("testDefaultSchemasList");
509 
510     List<String> defaultSchemasList  = Arrays.asList(C_DEFAULT_SCHEMAS.split(","));
511 
512     DBURI instance = new DBURI(C_TEST_DEFAULTS);
513     List<String> result = instance.getSchemasList() ;
514     assertEquals(defaultSchemasList, result);
515     // TODO review the generated test code and remove the default call to fail.
516     //fail("The test case is a prototype.");
517   }
518   
519 
520   /**
521    * Verify that default Source Code Types are returned if non are provided in the DBURI.
522    */
523   public void testDefaultSourceCodeTypesList() throws URISyntaxException, Exception {
524     System.out.println("testDefaultSourceCodeTypesList");
525 
526     List<String> defaultSourceCodeTypesList  = Arrays.asList(C_DEFAULT_SOURCE_CODE_TYPES.split(","));
527 
528     DBURI instance = new DBURI(C_TEST_DEFAULTS);
529     List<String> result = instance.getSourceCodeTypesList() ;
530     assertEquals(defaultSourceCodeTypesList, result);
531     // TODO review the generated test code and remove the default call to fail.
532     //fail("The test case is a prototype.");
533   }
534   
535   
536 
537   /**
538    * Verify that default languages are returned if non are provided in the DBURI.
539    */
540   public void testDefaultSourceCodeNamesList() throws URISyntaxException, Exception {
541     System.out.println("testDefaultSourceCodeNamesList");
542 
543     List<String> defaultSourceCodeNamesList  = Arrays.asList(C_DEFAULT_SOURCE_CODE_NAMES.split(","));
544 
545     DBURI instance = new DBURI(C_TEST_DEFAULTS);
546     List<String> result = instance.getSourceCodeNamesList() ;
547     assertEquals(defaultSourceCodeNamesList, result);
548     // TODO review the generated test code and remove the default call to fail.
549     //fail("The test case is a prototype.");
550   }
551   
552 
553   /**
554    * Verify that languages are returned if provided in the DBURI.
555    */
556   public void testExplicitLanguagesList() throws URISyntaxException, Exception {
557     System.out.println("testExplicitLanguagesList");
558 
559     List<String> defaultLanguagesList  = Arrays.asList(C_EXPLICIT_LANGUAGES.split(","));
560 
561     DBURI instance = new DBURI(C_TEST_EXPLICIT);
562     List<String> result = instance.getLanguagesList() ;
563     assertEquals(defaultLanguagesList, result);
564     // TODO review the generated test code and remove the call to fail.
565     //fail("The test case is a prototype.");
566   }
567   
568 
569   /**
570    * Verify that CharacterSet are returned if provided in the DBURI.
571    */
572   public void testExplicitCharacterSet() throws URISyntaxException, Exception {
573     System.out.println("testExplicitCharacterSet");
574 
575     DBURI instance = new DBURI(C_TEST_EXPLICIT);
576     String result = instance.getCharacterSet();
577     assertEquals(C_EXPLICIT_CHARACTERSET, result);
578     // TODO review the generated test code and remove the call to fail.
579     //fail("The test case is a prototype.");
580   }
581   
582 
583   /**
584    * Verify that languages are returned if provided in the DBURI.
585    */
586   public void testExplicitSchemasList() throws URISyntaxException, Exception {
587     System.out.println("testExplicitSchemasList");
588 
589     List<String> defaultSchemasList  = Arrays.asList(C_EXPLICIT_SCHEMAS.split(","));
590 
591     DBURI instance = new DBURI(C_TEST_EXPLICIT);
592     List<String> result = instance.getSchemasList() ;
593     assertEquals(defaultSchemasList, result);
594     // TODO review the generated test code and remove the call to fail.
595     //fail("The test case is a prototype.");
596   }
597   
598 
599   /**
600    * Verify that Source Code Types are returned if provided in the DBURI.
601    */
602   public void testExplicitSourceCodeTypesList() throws URISyntaxException, Exception {
603     System.out.println("testExplicitSourceCodeTypesList");
604 
605     List<String> defaultSourceCodeTypesList  = Arrays.asList(C_EXPLICIT_SOURCE_CODE_TYPES.split(","));
606 
607     DBURI instance = new DBURI(C_TEST_EXPLICIT);
608     List<String> result = instance.getSourceCodeTypesList() ;
609     assertEquals(defaultSourceCodeTypesList, result);
610     // TODO review the generated test code and remove the call to fail.
611     //fail("The test case is a prototype.");
612   }
613   
614   /**
615    * Verify that languages are returned if provided in the DBURI.
616    */
617   public void testExplicitSourceCodeNamesList() throws URISyntaxException, Exception {
618     System.out.println("testExplicitSourceCodeNamesList");
619 
620     List<String> defaultSourceCodeNamesList  = Arrays.asList(C_EXPLICIT_SOURCE_CODE_NAMES.split(","));
621 
622     DBURI instance = new DBURI(C_TEST_EXPLICIT);
623     List<String> result = instance.getSourceCodeNamesList() ;
624     assertEquals(defaultSourceCodeNamesList, result);
625     // TODO review the generated test code and remove the call to fail.
626     //fail("The test case is a prototype.");
627   }
628   
629 
630 }