Commit af7b5b5 1 parent 4e2a6c0 commit af7b5b5 Copy full SHA for af7b5b5
File tree 2 files changed +27
-0
lines changed
src/test/java/com/wherobots/db/jdbc
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ dependencies {
30
30
implementation ' org.apache.arrow:arrow-memory-netty:16.1.0'
31
31
implementation ' io.github.resilience4j:resilience4j-retry:2.2.0'
32
32
implementation ' org.slf4j:slf4j-simple:2.0.13'
33
+ // Test dependencies
34
+ testImplementation ' org.junit.jupiter:junit-jupiter-api:5.8.1'
35
+ testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.8.1'
33
36
}
34
37
35
38
// Apply a specific Java toolchain to ease working on different environments.
@@ -51,3 +54,7 @@ tasks.named('jar') {
51
54
tasks. withType(Jar ) {
52
55
archiveBaseName. set(' wherobots-jdbc' )
53
56
}
57
+
58
+ test {
59
+ useJUnitPlatform()
60
+ }
Original file line number Diff line number Diff line change
1
+ package com .wherobots .db .jdbc ;
2
+
3
+
4
+ import org .junit .jupiter .api .Test ;
5
+
6
+ import java .util .Map ;
7
+
8
+ class WherobotsJdbcDriverTest {
9
+
10
+ @ Test
11
+ void getUserAgentHeader () {
12
+ System .setProperty ("java.version" , "1" );
13
+ System .setProperty ("os.name" , "os1" );
14
+ WherobotsJdbcDriver driver = new WherobotsJdbcDriver ();
15
+ Map <String , String > header = driver .getUserAgentHeader ();
16
+ assert header .containsKey ("User-Agent" );
17
+ String user_agent = header .get ("User-Agent" );
18
+ assert user_agent .equals ("wherobots-jdbc-driver/unknown os/os1 java/1" );
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments