annotate src/test/java/de/intevation/lada/ImporterTest.java @ 318:fab1e6c74044

Commented out the main in Importertest and removed some annotations.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 23 Aug 2013 11:29:08 +0200
parents 9b4d417f1064
children 183f8116d9a6
rev   line source
311
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
1 package de.intevation.lada;
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
2
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
3 import java.util.ArrayList;
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
4 import java.util.List;
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
5
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
6 import org.junit.Ignore;
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
7
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 import de.intevation.lada.auth.AuthenticationResponse;
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 import de.intevation.lada.importer.TestLAFImporter;
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 @Ignore
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 public class ImporterTest
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 {
318
fab1e6c74044 Commented out the main in Importertest and removed some annotations.
Raimund Renkert <rrenkert@intevation.de>
parents: 314
diff changeset
15 /*
311
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 @Ignore
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 public static void main(String[] args) {
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 System.setProperty(
314
9b4d417f1064 Updated system property keys.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
19 "de.intevation.lada.test.singleprobe",
311
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 "/home/rrenkert/single.laf");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 System.setProperty(
314
9b4d417f1064 Updated system property keys.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
22 "de.intevation.lada.test.incompleteprobe",
311
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 "/home/rrenkert/incomplete.laf");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 System.setProperty(
314
9b4d417f1064 Updated system property keys.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
25 "de.intevation.lada.import",
311
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 "/opt/lada/config/import.json");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27 System.out.println("ImporterTest started.");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 TestLAFImporter test = new TestLAFImporter();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29 test.loadLafFiles();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 System.out.print("Testing config file not found: ");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
32 test.testConfigFileNotFound();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33 System.out.print("success.\n");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
34
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35 System.out.print("Testing config file: ");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
36 test.testConfigFileLoading();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37 System.out.print("success.\n");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
38
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
39 System.out.print("Testing Parser:\n 1. Wrong header: ");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
40 test.testProbeHeaderFail();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
41 System.out.print("success.\n 2. Complete probe: ");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
42 test.testCompleteParser();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
43 System.out.print("success.\n");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
44
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
45 //Prepare simulated authorization.
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
46 List<String> netzbetreiber = new ArrayList<String>();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
47 netzbetreiber.add("0611");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
48 List<String> mst = new ArrayList<String>();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
49 mst.add("06110");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
50 mst.add("06112");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
51 AuthenticationResponse auth = new AuthenticationResponse();
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
52 auth.setUser("testeins");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
53 auth.setNetzbetreiber(netzbetreiber);
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
54 auth.setMst(mst);
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
55 auth.setNetzbetreiber(netzbetreiber);
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
56
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
57
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
58 System.out.println("end.");
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
59 return;
318
fab1e6c74044 Commented out the main in Importertest and removed some annotations.
Raimund Renkert <rrenkert@intevation.de>
parents: 314
diff changeset
60 }*/
311
eeb5d3a5e194 JUnit test cases and small test application for LAF importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
61 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)