Skip to content

Commit

Permalink
update pom
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Mar 1, 2019
2 parents 6ed924c + 72a6efc commit 2ede222
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 7 additions & 2 deletions java-dotenv-4.1.1.pom → java-dotenv-4.0.1.pom
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.1</modelVersion>

<name>java-dotenv</name>
<description>Environment based config for the JVM</description>
Expand Down Expand Up @@ -96,7 +96,6 @@

<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
Expand All @@ -116,6 +115,12 @@
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/test/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.1</modelVersion>

<name>java-dotenv</name>
<description>Environment based config for the JVM</description>
Expand Down Expand Up @@ -96,7 +96,6 @@

<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
Expand All @@ -116,6 +115,12 @@
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/test/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
9 changes: 1 addition & 8 deletions src/test/java/tests/JavaTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
import org.junit.Test;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

public class JavaTests {
private Map<String, String> envVars;
Expand All @@ -21,7 +19,6 @@ public void setUp() {
envVars = new HashMap<String, String>();
envVars.put("MY_TEST_EV1", "my test ev 1");
envVars.put("MY_TEST_EV2", "my test ev 2");
envVars.put("ABSENT_ENV_VARIABLE", null);
envVars.put("WITHOUT_VALUE", "");
}

Expand All @@ -37,11 +34,6 @@ public void load() {
for (String envName : envVars.keySet()) {
assertEquals(envVars.get(envName), dotenv.get(envName));
}

String envName = "ABSENT_ENV_VARIABLE";
String defValue = "This is the default value";
assertEquals(defValue, dotenv.get(envName, defValue));
assertNull(dotenv.get(envName, defValue));
}

// @Test
Expand Down Expand Up @@ -96,6 +88,7 @@ public void configureWithIgnoreMissingAndMalformed() {
.ignoreIfMalformed()
.ignoreIfMissing()
.load();

assertNotNull(dotenv.get("PATH"));
}
}

0 comments on commit 2ede222

Please sign in to comment.