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