update SimpleJNDIUnitTest

This commit is contained in:
azhwani 2020-06-10 10:18:21 +01:00
parent fc78b24107
commit a7697334bd
1 changed files with 0 additions and 16 deletions

View File

@ -6,7 +6,6 @@ import javax.naming.Context;
import javax.naming.InitialContext; import javax.naming.InitialContext;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -16,12 +15,6 @@ public class SimpleJNDIUnitTest {
@BeforeEach @BeforeEach
public void setup() throws Exception { public void setup() throws Exception {
System.setProperty("java.naming.factory.initial", "org.osjava.sj.SimpleContextFactory");
System.setProperty("org.osjava.sj.root", "file://src/test/resources");
System.setProperty("org.osjava.sj.delimiter", ".");
System.setProperty("jndi.syntax.separator", "/");
System.setProperty("org.osjava.sj.space", "java:/comp/env");
this.initContext = new InitialContext(); this.initContext = new InitialContext();
} }
@ -34,13 +27,4 @@ public class SimpleJNDIUnitTest {
assertEquals(dsString, ds.toString()); assertEquals(dsString, ds.toString());
} }
@AfterEach
public void tearDown() {
System.clearProperty("java.naming.factory.initial");
System.clearProperty("org.osjava.sj.root");
System.clearProperty("org.osjava.sj.delimiter");
System.clearProperty("jndi.syntax.separator");
System.clearProperty("org.osjava.sj.space");
}
} }