[PATCH 2 of 2] Fixed missing package name
Wald Commits
scm-commit at wald.intevation.org
Wed Jul 15 14:27:10 CEST 2020
# HG changeset patch
# User Gernot Belger <g.belger at bjoernsen.de>
# Date 1594815953 -7200
# Wed Jul 15 14:25:53 2020 +0200
# Node ID f4fdf7798bab2442a2befa56e685e1369c81fad8
# Parent 9ec4686badae1c765761694b2722d5400cf42dcc
Fixed missing package name
diff -r 9ec4686badae -r f4fdf7798bab artifacts/src/test/java/org/dive4elements/river/utils/MapUtilsTest.java
--- a/artifacts/src/test/java/org/dive4elements/river/utils/MapUtilsTest.java Wed Jul 15 12:24:35 2020 +0200
+++ b/artifacts/src/test/java/org/dive4elements/river/utils/MapUtilsTest.java Wed Jul 15 14:25:53 2020 +0200
@@ -6,13 +6,13 @@
* documentation coming with Dive4Elements River for details.
*/
+package org.dive4elements.river.utils;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Test;
-import org.dive4elements.river.utils.MapUtils;
-
public class MapUtilsTest {
private static final String DRV_PG = "jdbc:postgresql:";
@@ -28,108 +28,108 @@
@Test
public void noJDBCURL() {
- String con = MapUtils.getConnection(USER, PSWD, "xx");
+ final String con = MapUtils.getConnection(USER, PSWD, "xx");
assertNull(con);
}
@Test
public void invalidHostPG() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_PG + "//invalid_host_name/");
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_PG + "//invalid_host_name/");
assertNull(con);
}
@Test
public void localNamedPG() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_PG + DB);
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_PG + DB);
assertEquals(
- "dbname=" + DB
- + " user=" + USER
- + " password='" + PSWD + "'" + PG_CON_SUFFIX,
- con);
+ "dbname=" + DB
+ + " user=" + USER
+ + " password='" + PSWD + "'" + PG_CON_SUFFIX,
+ con);
}
@Test
public void localUserPG() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_PG + "/");
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_PG + "/");
assertEquals(
- "dbname=" + USER
- + " user=" + USER
- + " password='" + PSWD + "'" + PG_CON_SUFFIX,
- con);
+ "dbname=" + USER
+ + " user=" + USER
+ + " password='" + PSWD + "'" + PG_CON_SUFFIX,
+ con);
}
@Test
public void hostNamedPG() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_PG + "//" + HOST + "/" + DB);
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_PG + "//" + HOST + "/" + DB);
assertEquals(
- "dbname=" + DB
- + " user=" + USER
- + " host='" + HOST + "'"
- + " password='" + PSWD + "'" + PG_CON_SUFFIX,
- con);
+ "dbname=" + DB
+ + " user=" + USER
+ + " host='" + HOST + "'"
+ + " password='" + PSWD + "'" + PG_CON_SUFFIX,
+ con);
}
@Test
public void hostUserPG() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_PG + "//" + HOST + "/");
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_PG + "//" + HOST + "/");
assertEquals(
- "dbname=" + USER
- + " user=" + USER
- + " host='" + HOST + "'"
- + " password='" + PSWD + "'" + PG_CON_SUFFIX,
- con);
+ "dbname=" + USER
+ + " user=" + USER
+ + " host='" + HOST + "'"
+ + " password='" + PSWD + "'" + PG_CON_SUFFIX,
+ con);
}
@Test
public void hostPortUserPG() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_PG + "//" + HOST + ":" + PORT + "/");
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_PG + "//" + HOST + ":" + PORT + "/");
assertEquals(
- "dbname=" + USER
- + " user=" + USER
- + " host='" + HOST + "' port=" + PORT
- + " password='" + PSWD + "'" + PG_CON_SUFFIX,
- con);
+ "dbname=" + USER
+ + " user=" + USER
+ + " host='" + HOST + "' port=" + PORT
+ + " password='" + PSWD + "'" + PG_CON_SUFFIX,
+ con);
}
@Test
public void hostPortNamedPG() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_PG + "//" + HOST + ":" + PORT + "/" + DB);
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_PG + "//" + HOST + ":" + PORT + "/" + DB);
assertEquals(
- "dbname=" + DB
- + " user=" + USER
- + " host='" + HOST + "' port=" + PORT
- + " password='" + PSWD + "'" + PG_CON_SUFFIX,
- con);
+ "dbname=" + DB
+ + " user=" + USER
+ + " host='" + HOST + "' port=" + PORT
+ + " password='" + PSWD + "'" + PG_CON_SUFFIX,
+ con);
}
@Test
public void serviceNameORA() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_ORA + "@//" + HOST + ":" + PORT + "/" + DB);
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_ORA + "@//" + HOST + ":" + PORT + "/" + DB);
assertEquals(
- USER + "/" + PSWD + "@" + HOST + ":" + PORT + "/" + DB,
- con);
+ USER + "/" + PSWD + "@" + HOST + ":" + PORT + "/" + DB,
+ con);
}
@Test
public void connectDescriptorORA() {
- String con = MapUtils.getConnection(
- USER, PSWD, DRV_ORA
- + "@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST="
- + HOST + ")(PORT=" + PORT + "))(CONNECT_DATA=(SERVICE_NAME="
- + DB + ")))");
+ final String con = MapUtils.getConnection(
+ USER, PSWD, DRV_ORA
+ + "@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST="
+ + HOST + ")(PORT=" + PORT + "))(CONNECT_DATA=(SERVICE_NAME="
+ + DB + ")))");
assertEquals(
- USER + "/" + PSWD
- + "@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST="
- + HOST + ")(PORT=" + PORT + "))(CONNECT_DATA=(SERVICE_NAME="
- + DB + ")))",
- con);
+ USER + "/" + PSWD
+ + "@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST="
+ + HOST + ")(PORT=" + PORT + "))(CONNECT_DATA=(SERVICE_NAME="
+ + DB + ")))",
+ con);
}
}
More information about the Dive4Elements-commits
mailing list