aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-29 12:39:04 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-29 12:39:04 +1200
commit51a0046d026d0e4273413e2e8c84ef9e26f0a4cf (patch)
tree260134e338c1c7f2cee0c716d07a64c0b0ea79a0 /test/org/traccar/web
parent9ab536ca8c4e1ad850cb5fa08bbe99f14676b535 (diff)
parent7644abe2e8aeb27de803b35bea772e2fe0a94c72 (diff)
downloadtrackermap-server-51a0046d026d0e4273413e2e8c84ef9e26f0a4cf.tar.gz
trackermap-server-51a0046d026d0e4273413e2e8c84ef9e26f0a4cf.tar.bz2
trackermap-server-51a0046d026d0e4273413e2e8c84ef9e26f0a4cf.zip
Merge branch master from github
Diffstat (limited to 'test/org/traccar/web')
-rw-r--r--test/org/traccar/web/WebServerInitialContextTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/org/traccar/web/WebServerInitialContextTest.java b/test/org/traccar/web/WebServerInitialContextTest.java
new file mode 100644
index 000000000..dd072863c
--- /dev/null
+++ b/test/org/traccar/web/WebServerInitialContextTest.java
@@ -0,0 +1,27 @@
+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);
+ }
+}