From 63ab6dcd5b23b517c9bd810773ae8535b1006c83 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 13 Dec 2015 08:25:16 +1300 Subject: Rename web server JNDI context test --- .../traccar/web/WebServerInitialContextTest.java | 27 -------------------- test/org/traccar/web/WebServerTest.java | 29 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 27 deletions(-) delete mode 100644 test/org/traccar/web/WebServerInitialContextTest.java create mode 100644 test/org/traccar/web/WebServerTest.java diff --git a/test/org/traccar/web/WebServerInitialContextTest.java b/test/org/traccar/web/WebServerInitialContextTest.java deleted file mode 100644 index dd072863c..000000000 --- a/test/org/traccar/web/WebServerInitialContextTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.traccar.web; - -import org.junit.Test; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.sql.DataSource; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; - -public class WebServerInitialContextTest { - @Test - public void smokeTest() throws NamingException { - DataSource mockDataSource = (DataSource) Proxy.newProxyInstance(getClass().getClassLoader(), - new Class[]{DataSource.class}, new InvocationHandler() { - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - return null; - } - }); - - Context context = new InitialContext(); - context.bind("java:/DefaultDS", mockDataSource); - } -} diff --git a/test/org/traccar/web/WebServerTest.java b/test/org/traccar/web/WebServerTest.java new file mode 100644 index 000000000..5a79fbac2 --- /dev/null +++ b/test/org/traccar/web/WebServerTest.java @@ -0,0 +1,29 @@ +package org.traccar.web; + +import org.junit.Test; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import javax.sql.DataSource; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; + +public class WebServerTest { + + @Test + public void contextTest() throws NamingException { + DataSource mockDataSource = (DataSource) Proxy.newProxyInstance(getClass().getClassLoader(), + new Class[] { DataSource.class }, new InvocationHandler() { + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + return null; + } + }); + + Context context = new InitialContext(); + context.bind("java:/DefaultDS", mockDataSource); + } + +} -- cgit v1.2.3