File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed
main/resources/META-INF/services
test/java/net/postgis/jdbc Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 1+ net.postgis.jdbc.DriverWrapper
2+ net.postgis.jdbc.DriverWrapperAutoprobe
3+ net.postgis.jdbc.DriverWrapperLW
Original file line number Diff line number Diff line change 2828package net .postgis .jdbc ;
2929
3030
31- import net .postgis .jdbc .PGgeometry ;
3231import org .testng .Assert ;
3332import org .testng .annotations .Test ;
3433
Original file line number Diff line number Diff line change 1+ package net .postgis .jdbc ;
2+
3+ import org .junit .Assert ;
4+ import org .junit .Test ;
5+
6+ import java .sql .Driver ;
7+ import java .sql .DriverManager ;
8+ import java .sql .SQLException ;
9+
10+ /**
11+ * Tests to ensure that the drivers that are registered as services in META-INF/services/java.sql.Driver are resolved
12+ * correctly.
13+ */
14+ public class ServiceTest {
15+
16+ @ Test
17+ public void testWrapperService () throws SQLException {
18+ Driver driver = DriverManager .getDriver ("jdbc:postgresql_postGIS:/" );
19+ Assert .assertEquals (DriverWrapper .class , driver .getClass ());
20+ }
21+
22+ @ Test
23+ public void testWrapperAutoprobeService () throws SQLException {
24+ Driver driver = DriverManager .getDriver ("jdbc:postgresql_autogis:/" );
25+ Assert .assertEquals (DriverWrapperAutoprobe .class , driver .getClass ());
26+ }
27+
28+ @ Test
29+ public void testWrapperLWService () throws SQLException {
30+ Driver driver = DriverManager .getDriver ("jdbc:postgresql_lwgis:/" );
31+ Assert .assertEquals (DriverWrapperLW .class , driver .getClass ());
32+ }
33+
34+ }
You can’t perform that action at this time.
0 commit comments