source: vlo/branches/vlo-3.0/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/DefaultVloConfigFactoryTest.java @ 4507

Last change on this file since 4507 was 4507, checked in by twagoo, 10 years ago

turned VloConfig? into a POJO, created factory interface so that multiple ways. Adapted importer and web app to use this - importer still using static (but project-local) config references

File size: 24.4 KB
Line 
1
2package eu.clarin.cmdi.vlo.config;
3
4import java.io.File;
5import java.io.UnsupportedEncodingException;
6import java.net.URLEncoder;
7import java.util.ArrayList;
8import java.util.List;
9import static org.junit.Assert.*;
10import org.junit.BeforeClass;
11import org.junit.Test;
12
13/**
14 *
15 * @author keeloo
16 */
17public class DefaultVloConfigFactoryTest {
18   
19    public DefaultVloConfigFactoryTest() {
20    }
21   
22    private static VloConfig config;
23   
24    @BeforeClass
25    public static void setUp() {       
26        config = new DefaultVloConfigFactory().newConfig();
27    }
28
29    /**
30     * Test the getDataRoots method.<br><br>
31     *
32     * Use the values defined in the packaged {@literal VloConfig.xml}
33     * configuration file.
34     */
35    @Test
36    public void testGetDataRoots() {
37       
38        ArrayList<DataRoot> dataRoots;
39        dataRoots = new ArrayList<DataRoot> ();
40       
41        dataRoots.add(new DataRoot("MPI IMDI Archive", 
42                                    new File("/lat/apache/htdocs/oai-harvester/mpi-self-harvest/harvested/results/cmdi/"),
43                                   "http://catalog.clarin.eu/",
44                                   "/lat/apache/htdocs/", false));
45        dataRoots.add(new DataRoot("CMDI Providers"  , 
46                                    new File("/lat/apache/htdocs/oai-harvester/cmdi-providers/harvested/results/cmdi/"),
47                                   "http://catalog.clarin.eu/",
48                                   "/lat/apache/htdocs/", false));
49        dataRoots.add(new DataRoot("OLAC Metadata Providers", 
50                                    new File("/lat/apache/htdocs/oai-harvester/olac-and-dc-providers/harvested/results/cmdi/"),
51                                   "http://catalog.clarin.eu/",
52                                   "/lat/apache/htdocs/", false));
53       
54        System.out.println("getDataRoots");
55       
56        List rootsReturned = config.getDataRoots();
57       
58        assertEquals(dataRoots, rootsReturned);
59    }
60
61    /**
62     * Test the set setDataRoots method
63     */
64    @Test
65    public void testSetDataRoots() {
66       
67        ArrayList<DataRoot> dataRoots = new ArrayList<DataRoot> ();
68       
69        dataRoots.add(new DataRoot("MPI IMDI Archive", 
70                                    new File("/lat/apache/htdocs/oai-harvester/mpi-self-harvest/harvested/results/cmdi/"),
71                                   "http://catalog.clarin.eu/",
72                                   "/lat/apache/htdocs/", false)); 
73        dataRoots.add(new DataRoot("CMDI Providers"  , 
74                                    new File("/lat/apache/htdocs/oai-harvester/cmdi-providers/harvested/results/cmdi/"),
75                                   "http://catalog.clarin.eu/",
76                                   "/lat/apache/htdocs/", false));
77        dataRoots.add(new DataRoot("OLAC Metadata Providers", 
78                                    new File("/lat/apache/htdocs/oai-harvester/olac-and-dc-providers/harvested/results/cmdi/"),
79                                   "http://catalog.clarin.eu/",
80                                   "/lat/apache/htdocs/", false));
81       
82        System.out.println("setDataRoots");
83
84        config.setDataRoots(dataRoots);
85       
86        List rootsReturned = config.getDataRoots(); 
87       
88        assertEquals (dataRoots, rootsReturned);
89    }
90
91    /**
92     * Test the getPagesInApplicationCache method
93     */
94    @Test
95    public void testGetPagesInApplicationCache() {
96       
97        System.out.println("getPagesInApplicationCache");
98       
99        int expResult = 40; // as defined in vloconfig.xml
100        int result = config.getPagesInApplicationCache();
101       
102        assertEquals(expResult, result);
103    }
104
105    /**
106     * Test the setPagesInApplicationCache method
107     */
108    @Test
109    public void testSetPagesInApplicationCache() {
110       
111        System.out.println("setPagesInApplicationCache");
112       
113        int param = 999;
114       
115        config.setPagesInApplicationCache(param);
116
117        int result = config.getPagesInApplicationCache();
118       
119        assertEquals(param, result);
120    }
121   
122   
123    /**
124     * Test the getSessionCacheSize method
125     */
126    @Test
127    public void testGetSessionCacheSize() {
128       
129        System.out.println("getPagesInApplicationCache");
130       
131        int expResult = 10000; // as defined in vloconfig.xml
132        int result = config.getSessionCacheSize();
133       
134        assertEquals(expResult, result);
135    }
136
137    /**
138     * Test the setSessionCacheSize method
139     */
140    @Test
141    public void testSetSessionCacheSize() {
142       
143        System.out.println("setPagesInApplicationCache");
144       
145        int param = 9999;
146       
147        config.setSessionCacheSize(param);
148
149        int result = config.getSessionCacheSize();
150       
151        assertEquals(param, result);
152    }
153   
154    /**
155     * Test the getMaxDocsInList method
156     */
157    @Test
158    public void testGetMaxDocsInList() {
159       
160        System.out.println("getMaxDocsInList");
161       
162        int expResult = 128;
163        int result = config.getMaxDocsInList();
164       
165        assertEquals(expResult, result);
166    }
167
168    /**
169     * Test the setMaxDocsInList method
170     */
171    @Test
172    public void testSetMaxDocsInList() {
173       
174        System.out.println("setMaxDocsInList");
175       
176        int param = 1000;
177       
178        config.setMaxDocsInList(param);
179
180        int result = config.getMaxDocsInList();
181       
182        assertEquals(param, result);
183    }
184   
185    /**
186     * Test the getMaxDocsInSolrQueue method
187     */
188    @Test
189    public void testGetMaxDocsInSolrQueue() {
190       
191        System.out.println("getMaxDocsInSolrQueue");
192       
193        int expResult = 128;
194        int result = config.getMaxDocsInList();
195       
196        assertEquals(expResult, result);
197    }
198
199    /**
200     * Test the setMaxDocsInSolrQueue method
201     */
202    @Test
203    public void testSetMaxDocsInSolrQueue() {
204       
205        System.out.println("setMaxDocsInSolrQueue");
206       
207        int param = 1000;
208       
209        config.setMaxDocsInList(param);
210
211        int result = config.getMaxDocsInList();
212       
213        assertEquals(param, result);
214    }
215   
216    /**
217     * Test the getMaxFileSize method
218     */
219    @Test
220    public void testGetMaxFileSize() {
221       
222        System.out.println("getMaxFileSize");
223       
224        int expResult = 10000000;
225        int result = config.getMaxFileSize();
226       
227        assertEquals(expResult, result);
228    }
229
230    /**
231     * Test the setMaxFileSize method
232     */
233    @Test
234    public void testSetMaxFileSize() {
235       
236        System.out.println("setMaxFileSize");
237       
238        int param = 10000000;
239       
240        config.setMaxFileSize(param);
241
242        int result = config.getMaxFileSize();
243       
244        assertEquals(param, result);
245    }
246   
247    /**
248     * Test the getHandleResolver method
249     */
250    @Test
251    public void testGetUseHandleResolver() {
252       
253        System.out.println("getUseHandleResolver");
254       
255        boolean expResult = false;
256        boolean result = config.getUseHandleResolver();
257       
258        assertEquals(expResult, result);
259    }
260   
261    /**
262     * Test the setUseHandleResolver method
263     */
264    @Test
265    public void testSetUseHandleResolver() {
266       
267        System.out.println("setUseHandleResolver");
268       
269        boolean param = true;
270       
271        config.setUseHandleResolver(param);
272
273        boolean result = config.getUseHandleResolver();
274       
275        assertEquals(param, result);
276    }
277
278    /**
279     * Test the deleteAllFirst method
280     */
281    @Test
282    public void testDeleteAllFirst() {
283       
284        System.out.println("deleteAllFirst");
285       
286        boolean expResult = true;
287        boolean result = config.deleteAllFirst();
288       
289        assertEquals(expResult, result);
290    }
291
292    /**
293     * Test the deleteAllFirst method
294     */
295    @Test
296    public void testSetDeleteAllFirst() {
297       
298        System.out.println("setDeleteAllFirst");
299       
300        boolean param = true;
301       
302        config.setDeleteAllFirst(param);
303
304        boolean result = config.deleteAllFirst();
305       
306        assertEquals(param, result);
307    }
308
309    /**
310     * Test the printMapping method
311     */
312    @Test
313    public void testPrintMapping() {
314       
315        System.out.println("printMapping");
316       
317        boolean expResult = false;
318        boolean result = config.printMapping();
319       
320        assertEquals(expResult, result);
321    }
322
323    /**
324     * Test the setPrintMapping method
325     */
326    @Test
327    public void testSetPrintMapping() {
328        System.out.println("setPrintMapping");
329       
330        boolean param = false;
331       
332        config.setPrintMapping(param);
333
334        boolean result = config.printMapping();
335       
336        assertEquals(param, result);
337    }
338
339    /**
340     * Test the getHomeUrl method
341     */
342    @Test
343    public void testGetVloHomeLink() {
344       
345        System.out.println("getVloHomeLink");
346       
347        String expResult = "http://www.clarin.eu/vlo";
348        String result = config.getHomeUrl();
349       
350        assertEquals(expResult, result);
351    }
352
353    /**
354     * Test the setHomeUrl method
355     */
356    @Test
357    public void testSetVloHomeLink() {
358       
359        System.out.println("setVloHomeLink");
360       
361        String param = "http://www.clarin.eu/vlo";
362       
363        config.setHomeUrl(param);
364
365        String result = config.getHomeUrl();
366       
367        assertEquals(param, result);
368    }
369
370    /**
371     * Test the getHelpUrl method
372     */
373    @Test
374    public void testGetHelpUrl() {
375       
376        System.out.println("getHelpUrl");
377       
378        String expResult = "http://www.clarin.eu/vlo";
379        String result = config.getHelpUrl();
380       
381        assertEquals(expResult, result);
382    }
383
384    /**
385     * Test the setHelpUrl method
386     */
387    @Test
388    public void testSetHelpUrl() {
389       
390        System.out.println("setHelpUrl");
391       
392        String param = "http://www.clarin.eu/vlo";
393       
394        config.setHelpUrl(param);
395
396        String result = config.getHelpUrl();
397       
398        assertEquals(param, result);
399    }
400
401    /**
402     * Test the getSolrUrl method
403     */
404    @Test
405    public void testGetSolrUrl() {
406       
407        System.out.println("getSolrUrl");
408       
409        String expResult = "http://localhost:8084/vlo_solr/";
410        String result = config.getSolrUrl();
411       
412        assertEquals(expResult, result);
413    }
414
415    /**
416     * Test the setHomeUrl method
417     */
418    @Test
419    public void testSetSolrUrl() {
420       
421        System.out.println("setSolrUrl");
422       
423        String param = "http://localhost:8084/vlo_solr/";
424       
425        config.setSolrUrl(param);
426
427        String result = config.getSolrUrl();
428       
429        assertEquals(param, result);
430    }
431   
432    /**
433     * Test the getGetComponentRegistryProfileSchema method
434     */
435    @Test
436    public void testGetComponentRegistryProfileSchema() {
437       
438        System.out.println("getComponentRegistryProfileSchema");
439       
440        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/someId/xsd";
441        String result = config.getComponentRegistryProfileSchema("someId");
442       
443        assertEquals(expResult, result);
444    }
445   
446    /**
447     * Test the getComponentRegistryRESTURL method
448     */
449    @Test
450    public void testGetComponentRegistryRESTURL() {
451       
452        System.out.println("getComponentRegistryRESTURL");
453       
454        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/";
455        String result = config.getComponentRegistryRESTURL();
456       
457        assertEquals(expResult, result);
458    }
459
460    /**
461     * Test the setComponentRegistryRESTURL method
462     */
463    @Test
464    public void testComponentRegistryRESTURL() {
465       
466        System.out.println("setComponentRegistryRESTURL");
467       
468        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/";
469       
470        config.setComponentRegistryRESTURL(param);
471
472        String result = config.getComponentRegistryRESTURL();
473       
474        assertEquals(param, result);
475    }
476   
477    /**
478     * Test the getHandleServerUrl method
479     */
480    @Test
481    public void testGetHandleServerUrl() {
482       
483        System.out.println("getHandleServerUrl");
484       
485        String expResult = "http://hdl.handle.net/";
486        String result = config.getHandleServerUrl();
487       
488        assertEquals(expResult, result);
489    }
490
491    /**
492     * Test the setHandleServerUrl method
493     */
494    @Test
495    public void testSetHandleServerUrl() {
496       
497        System.out.println("setHandleServerUrl");
498       
499        String param = "http://hdl.handle.net/";
500       
501        config.setHandleServerUrl(param);
502
503        String result = config.getHandleServerUrl();
504       
505        assertEquals(param, result);
506    }
507   
508    /**
509     * Test the getIMDIBrowserUrl method
510     */
511    @Test
512    public void testGetIMDIBrowserUrl() {
513       
514        System.out.println("getIMDIBrowserUrl");
515       
516        String expResult;
517        try {
518            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + URLEncoder.encode("handle", "UTF-8");
519        } catch (UnsupportedEncodingException ex) {
520            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + "handle";
521        }
522        String result = config.getIMDIBrowserUrl("handle");
523
524        assertEquals(expResult, result);
525    }
526
527    /**
528     * Test the setIMDIBrowserUrl method
529     */
530    @Test
531    public void testSetIMDIBrowserUrl() {
532       
533        System.out.println("setIMDIBrowserUrl");
534       
535        String param = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=";
536       
537        config.setIMDIBrowserUrl(param);
538
539        String expResult;
540        try {
541            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + URLEncoder.encode("handle", "UTF-8");
542        } catch (UnsupportedEncodingException ex) {
543            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + "handle";
544        }
545       
546        String result = config.getIMDIBrowserUrl("handle");
547
548        assertEquals(expResult, result);
549    }
550   
551    /**
552     * Test the getLanguageLinkPrefix method
553     */
554    @Test
555    public void testGetLanguageLinkPrefix() {
556       
557        System.out.println("getLanguageLinkPrefix");
558       
559        String expResult = "http://infra.clarin.eu/service/language/info.php?code=";
560        String result = config.getLanguageLinkPrefix();
561       
562        assertEquals(expResult, result);
563    }
564
565    /**
566     * Test the setLanguageLinkPrefix method
567     */
568    @Test
569    public void testSetLanguageLinkPrefix() {
570       
571        System.out.println("setLanguageLinkPrefix");
572       
573        String param = "http://infra.clarin.eu/service/language/info.php?code=";
574       
575        config.setLanguageLinkPrefix(param);
576
577        String result = config.getLanguageLinkPrefix();
578       
579        assertEquals(param, result);
580    }
581   
582    /**
583     * Test the getFeedbackFromUrl method
584     */
585    @Test
586    public void testGetFeedbackFromUrl() {
587       
588        System.out.println("getFeedBackFromUrl");
589       
590        String expResult = "http://www.clarin.eu/node/3759?url=";
591        String result = config.getFeedbackFromUrl();
592       
593        assertEquals(expResult, result);
594    }
595
596    /**
597     * Test the setFeedbackFromUrl method
598     */
599    @Test
600    public void testSetFeedbackFromUrl() {
601       
602        System.out.println("setFeedbackFromUrl");
603       
604        String param = "http://www.clarin.eu/node/3759?url=";
605       
606        config.setFeedbackFromUrl(param);
607
608        String result = config.getFeedbackFromUrl();
609       
610        assertEquals(param, result);
611    }
612   
613    /**
614     * Test the getFederatedContentSearchUrl method
615     */
616    @Test
617    public void testGetFederatedContentSearchUrl() {
618       
619        System.out.println("getFederatedContentSearchUrl");
620       
621        String expResult = "http://weblicht.sfs.uni-tuebingen.de/Aggregator/";
622        String result = config.getFederatedContentSearchUrl();
623       
624        assertEquals(expResult, result);
625    }
626
627    /**
628     * Test the setFederatedContentSearchUrl method
629     */
630    @Test
631    public void testSetFederatedContentSearchUrl() {
632       
633        System.out.println("setFederatedContentSearchUrl");
634       
635        String param = "http://weblicht.sfs.uni-tuebingen.de/Aggregator/";
636       
637        config.setFederatedContentSearchUrl(param);
638
639        String result = config.getFederatedContentSearchUrl();
640       
641        assertEquals(param, result);
642    }
643
644    /**
645     * Test the getNationalProjectMapping method
646     */
647    @Test
648    public void testGetNationalProjectMapping() {
649       
650        System.out.println("getNationalProjectMapping");
651       
652        String expResult = "/nationalProjectsMapping.xml";
653        String result = config.getNationalProjectMapping();
654       
655        assertEquals(expResult, result);
656    }
657
658    /**
659     * Test the setNationalProjectMapping method
660     */
661    @Test
662    public void testSetNationalProjectMapping() {
663       
664        System.out.println("setFNationalProjectMapping");
665       
666        String param = "nationalProjectsMapping.xml";
667       
668        config.setNationalProjectMapping(param);
669
670        String result = config.getNationalProjectMapping();
671       
672        assertEquals(param, result);
673    }   
674
675    /**
676     * Test of getFacetFields method
677     */
678    @Test
679    public void testGetFacetFields() {
680       
681        System.out.println("getFacetFields");
682       
683        String[] expResult = {
684        "collection",
685        "language",
686        "resourceClass",
687        "modality",
688        "continent",
689        "genre",
690        "country",
691        "subject",
692        "organisation",
693        "format",
694        "dataProvider",
695        "nationalProject",
696        "keywords"};
697   
698        String[] result = config.getFacetFields();
699   
700        assertArrayEquals(expResult, result);
701    }
702
703    /**
704     * Test of setFacetFields method, of class VloConfig
705     */
706    @Test
707    public void testSetFacetFields() {
708       
709        System.out.println("setFacetFields");
710       
711        String[] expResult = {
712        "collection",
713        "language",
714        "resourceClass",
715        "modality",
716        "continent",
717        "genre",
718        "country",
719        "subject",
720        "organisation",
721        "format",
722        "dataProvider",
723        "nationalProject",
724        "keywords"};
725       
726        config.setFacetFields(expResult);
727       
728        String result[] = config.getFacetFields();
729
730        assertArrayEquals(expResult, result);
731    }
732   
733    /**
734     * Test the getCountryComponentUrl method.
735     */
736    @Test
737    public void testCountryComponentUrl() {
738       
739        System.out.println("getCountryComponentUrl");
740       
741        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438104/xml";
742        String result = config.getCountryComponentUrl();
743       
744        assertEquals(expResult, result);
745    }
746
747    /**
748     * Test the setCountryComponentUrl method.
749     */
750    @Test
751    public void testSetCountryComponentUrl() {
752       
753        System.out.println("setCountryComponentUrl");
754       
755        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438104/xml";
756       
757        config.setCountryComponentUrl(param);
758
759        String result = config.getCountryComponentUrl();
760       
761        assertEquals(param, result);
762    } 
763   
764    /**
765     * Test the getLanguage2LetterCodeComponentUrl method.
766     */
767    @Test
768    public void testGetLanguage2LetterCodeComponentUrl() {
769       
770        System.out.println("getLanguage2LetterCodeComponentUrl");
771       
772        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438109/xml";
773        String result = config.getLanguage2LetterCodeComponentUrl();
774       
775        assertEquals(expResult, result);
776    }
777
778    /**
779     * Test the setLanguage2LetterCodeComponentUrl method.
780     */
781    @Test
782    public void testSetLanguage2LetterCodeComponentUrl() {
783       
784        System.out.println("setLanguage2LetterCodeComponentUrl");
785       
786        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438109/xml";
787       
788        config.setLanguage2LetterCodeComponentUrl(param);
789
790        String result = config.getLanguage2LetterCodeComponentUrl();
791       
792        assertEquals(param, result);
793    }
794   
795    /**
796     * Test the getLanguage3LetterCodeComponentUrl.
797     */
798    @Test
799    public void testGetLanguage3LetterCodeComponentUrl() {
800       
801        System.out.println("getLanguage3LetterCodeComponentUrl");
802       
803        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438110/xml";
804        String result = config.getLanguage3LetterCodeComponentUrl();
805       
806        assertEquals(expResult, result);
807    }
808
809    /**
810     * Test the setLanguage3LetterCodeComponentUrl.
811     */
812    @Test
813    public void testSetLanguage3LetterCodeComponentUrl() {
814       
815        System.out.println("setLanguage3LetterCodeComponentUrl");
816       
817        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438110/xml";
818       
819        config.setLanguage3LetterCodeComponentUrl(param);
820
821        String result = config.getLanguage3LetterCodeComponentUrl();
822       
823        assertEquals(param, result);
824    }
825   
826    /**
827     * Test the getSilToISO639CodesUrl method.
828     */
829    @Test
830    public void testGetSilToISO639CodesUrl() {
831       
832        System.out.println("getSilToISO639CodesUrl");
833       
834        String expResult = "http://www.clarin.eu/cmd/xslt/sil_to_iso6393.xml";
835        String result = config.getSilToISO639CodesUrl();
836       
837        assertEquals(expResult, result);
838    }
839
840    /**
841     * Test the setSilToISO639CodesUrl method.
842     */
843    @Test
844    public void testSetSilToISO639CodesUrl() {
845       
846        System.out.println("setSilToISO639CodesUrl");
847       
848        String param = "http://www.clarin.eu/cmd/xslt/sil_to_iso6393.xml";
849       
850        config.setSilToISO639CodesUrl(param);
851
852        String result = config.getSilToISO639CodesUrl();
853       
854        assertEquals(param, result);
855    }
856   
857    /**
858     * Test the getReverseProxyPrefix method
859     */
860    @Test
861    public void testReverseProxyPrefix() {
862       
863        System.out.println("getReverseProxyPrefix");
864       
865        String expResult = "";
866        String result = config.getReverseProxyPrefix();
867       
868        assertEquals(expResult, result);
869    }
870
871    /**
872     * Test the setReverseProxyPrefix method
873     */
874    @Test
875    public void testSetReverseProxyPrefix() {
876       
877        System.out.println("setReverseProxyPrefix");
878       
879        String param = "vlodev/";
880       
881        config.setReverseProxyPrefix(param);
882
883        String result = config.getReverseProxyPrefix();
884       
885        assertEquals(param, result);
886    }
887
888    /**
889     * Test the getCqlEndpointFilter method
890     */
891    @Test
892    public void testGetCqlEndpointFilter() {
893       
894        System.out.println("getCqlEndpointFilter");
895       
896        String expResult = "http://cqlservlet.mpi.nl/";
897        String result = config.getCqlEndpointFilter();
898       
899        assertEquals(expResult, result);
900    }
901
902    /**
903     * Test the setCqlEndpointFilter method
904     */
905    @Test
906    public void testSetCqlEndpointFilter() {
907       
908        System.out.println("setCqlEndpointFilter");
909       
910        String param = "http://cqlservlet.mpi.nl/";
911       
912        config.setCqlEndpointFilter(param);
913
914        String result = config.getCqlEndpointFilter();
915       
916        assertEquals(param, result);
917    }
918
919    /**
920     * Test the getCqlEndpointAlternative method
921     */
922    @Test
923    public void testGetCqlEndpointAlternative() {
924       
925        System.out.println("getCqlEndpointAlternative");
926       
927        String expResult = "http://cqlservlet.mpi.nl/";
928        String result = config.getCqlEndpointAlternative();
929       
930        assertEquals(expResult, result);
931    }
932
933    /**
934     * Test the setCqlEndpointAlternative method
935     */
936    @Test
937    public void testSetCqlEndpointAlternative() {
938       
939        System.out.println("setCqlEndpointAlternative");
940       
941        String param = "http://cqlservlet.mpi.nl/";
942       
943        config.setCqlEndpointAlternative(param);
944
945        String result = config.getCqlEndpointAlternative();
946       
947        assertEquals(param, result);
948    }
949}
Note: See TracBrowser for help on using the repository browser.