Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/ressource/RessourceFactoryTestCase.java @ 491:cbb6b592bc6f
Mark the fis select node with an attribute 'fis', which is important for the XSL sheet to create a link to step back to this point.
gnv-artifacts/trunk@567 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 18 Jan 2010 15:49:12 +0000 |
parents | 7fb9441dd8af |
children | 9a828e5a2390 |
rev | line source |
---|---|
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.artifacts.ressource; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
118
5ebc059064a6
Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
117
diff
changeset
|
3 import junit.framework.TestCase; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 import org.apache.log4j.BasicConfigurator; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 import org.apache.log4j.Logger; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 |
118
5ebc059064a6
Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
117
diff
changeset
|
8 import de.intevation.artifactdatabase.DefaultPreferredLocale; |
5ebc059064a6
Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
117
diff
changeset
|
9 import de.intevation.artifacts.PreferredLocale; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 /** |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 * @author Tim Englich <tim.englich@intevation.de> |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
13 * |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 */ |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 public class RessourceFactoryTestCase extends TestCase { |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 /** |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 * the logger, used to log exceptions and additonaly information |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 */ |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 private static Logger log = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
20 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 static { |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 BasicConfigurator.configure(); |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 log = Logger.getLogger(RessourceFactoryTestCase.class); |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
25 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 /** |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 * Constructor |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
28 * |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 * @param name |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 */ |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 public RessourceFactoryTestCase(String name) { |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 super(name); |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 } |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 /** |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 * @see junit.framework.TestCase#setUp() |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 */ |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
38 @Override |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 protected void setUp() throws Exception { |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 super.setUp(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
41 // System.setProperty("artifact.ressource.dir", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
42 // "src/test/ressources/lang"); |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
44 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
45 public void testRessurceFactoryTestCase() { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
46 ; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
47 String value = RessourceFactory.getInstance() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
48 .getRessource( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
49 new PreferredLocale[] { new DefaultPreferredLocale( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
50 "de", 1.0f) }, "fis_modeldata", "N/N"); |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 log.debug(value); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
52 value = RessourceFactory.getInstance() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
53 .getRessource( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
54 new PreferredLocale[] { new DefaultPreferredLocale( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
118
diff
changeset
|
55 "en", 1.0f) }, "fis_modeldata", "N/N"); |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 log.debug(value); |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 } |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 } |