changeset 315:79cbc672d8e4

Updates systemproperty keys and testcases.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 21 Aug 2013 08:58:28 +0200
parents 9b4d417f1064
children 2adf28ac7fe0
files src/test/java/de/intevation/lada/importer/TestLAFImporter.java
diffstat 1 files changed, 9 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/test/java/de/intevation/lada/importer/TestLAFImporter.java	Wed Aug 21 08:57:57 2013 +0200
+++ b/src/test/java/de/intevation/lada/importer/TestLAFImporter.java	Wed Aug 21 08:58:28 2013 +0200
@@ -33,9 +33,9 @@
     @Before
     @Ignore
     public void loadLafFiles() {
-        String single = System.getProperty("de_intevation_lada_test_singleprobe");
+        String single = System.getProperty("de.intevation.lada.test.singleprobe");
         String incomplete =
-            System.getProperty("de_intevation_lada_test_incompleteprobe");
+            System.getProperty("de.intevation.lada.test.incompleteprobe");
         try {
             byte[] encodedSingle = Files.readAllBytes(Paths.get(single));
             byte[] encodedIncomplete =
@@ -52,17 +52,16 @@
         }
     }
 
-    @Test(expected = IOException.class)
-    @Ignore
+    @Test
     public void testConfigFileNotFound() {
         LAFFormat format = new LAFFormat();
         boolean success = format.readConfigFile("/file/not/found");
+        assertEquals(false, success);
     }
 
     @Test
-    @Ignore
     public void testConfigFileLoading() {
-        String fileName = System.getProperty("de_intevation_lada_import");
+        String fileName = System.getProperty("de.intevation.lada.import");
         LAFFormat format = new LAFFormat();
         boolean success = format.readConfigFile(fileName);
         assertEquals(true, success);
@@ -86,13 +85,13 @@
             ortFormat.size());
     }
 
-    @Test(expected = LAFParserException.class)
-    @Ignore
+    @Test
     public void testProbeHeaderFail() {
         LAFParser parser = new LAFParser();
         parser.setDryRun(true);
         try {
-            parser.parse(PROBE_HEADER_FAIL);
+            boolean success = parser.parse(PROBE_HEADER_FAIL);
+            assertEquals(false, success);
         }
         catch (LAFParserException e) {
             assertEquals(
@@ -115,10 +114,9 @@
     }
 
     @Test
-    @Ignore
     public void testCompleteParser() {
         LAFParser parser = new LAFParser();
-        //parser.setDryRun(true);
+        parser.setDryRun(true);
         try {
             parser.parse(singleProbe);
         }
@@ -126,16 +124,4 @@
             e.printStackTrace();
         }
     }
-
-    @Test
-    @Ignore
-    public void testMessungParser() {
-        fail("Not yet implemented");
-    }
-
-    @Test
-    @Ignore
-    public void testOrtParser() {
-        fail("Not yet implemented");
-    }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)