quick update
This commit is contained in:
parent
861030bef5
commit
fc78b24107
|
@ -1,5 +0,0 @@
|
|||
java.naming.factory.initial=org.osjava.sj.SimpleContextFactory
|
||||
org.osjava.sj.root=file://src/test/resources
|
||||
org.osjava.sj.delimiter=.
|
||||
jndi.syntax.separator=/
|
||||
org.osjava.sj.space=java:/comp/env
|
|
@ -6,6 +6,7 @@ import javax.naming.Context;
|
|||
import javax.naming.InitialContext;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -15,6 +16,12 @@ public class SimpleJNDIUnitTest {
|
|||
|
||||
@BeforeEach
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -26,5 +33,14 @@ public class SimpleJNDIUnitTest {
|
|||
|
||||
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");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue