Skip to content

Commit 15434ab

Browse files
committed
AJ-543:add test case about Duration
1 parent f9ab070 commit 15434ab

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/com/xxdb/DBConnectionTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,15 @@ public void testDictionaryUpload() throws IOException {
13321332
Entity dict1 = conn.run("dict");
13331333
assertEquals(3, dict1.rows());
13341334
}
1335+
@Test
1336+
public void testDurationUpload() throws IOException {
1337+
Entity duration = conn.run("duration(3XNYS)");
1338+
Map<String, Entity> map = new HashMap<String, Entity>();
1339+
map.put("duration", duration);
1340+
conn.upload(map);
1341+
Entity duration1 = conn.run("duration");
1342+
assertEquals("3XNYS", duration1.getString());
1343+
}
13351344

13361345
@Test
13371346
public void testFunction() throws IOException {
@@ -1365,6 +1374,17 @@ public void testAnyVector() throws IOException, Exception {
13651374
assertEquals("2", result.get(0).getString());
13661375
}
13671376

1377+
@Test
1378+
public void testAnyVector_Duration_Upload() throws Exception {
1379+
DBConnection conn = new DBConnection();
1380+
conn.connect(HOST,PORT,"admin","123456");
1381+
Entity bdv = conn.run("[duration(3XNYS),duration(3XNYS)]");
1382+
Map<String, Entity> map = new HashMap<String, Entity>();
1383+
map.put("duration", bdv);
1384+
conn.upload(map);
1385+
Entity duration1 = conn.run("duration");
1386+
assertEquals("(3XNYS,3XNYS)", duration1.getString());
1387+
}
13681388
@Test
13691389
public void testSet() throws IOException {
13701390
BasicSet result = (BasicSet) conn.run("set(1+3*1..100)");

0 commit comments

Comments
 (0)