diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2015-06-07 00:50:45 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2015-06-07 00:50:45 +0200 |
commit | bc8bf89edc3e24a756c1c9628087a5ae6f5af80a (patch) | |
tree | e6861d07d09e839f3222ca862747da165addc746 /src/test/scala/org/xapek/influxdb | |
parent | 8a17a2f6d77cb6bd3e5629d3944b30f449cb1237 (diff) | |
download | influxdb-tools-bc8bf89edc3e24a756c1c9628087a5ae6f5af80a.tar.gz influxdb-tools-bc8bf89edc3e24a756c1c9628087a5ae6f5af80a.zip |
first request worked. no result transformation yet
Diffstat (limited to 'src/test/scala/org/xapek/influxdb')
-rw-r--r-- | src/test/scala/org/xapek/influxdb/InfluxdbTest.scala | 22 | ||||
-rw-r--r-- | src/test/scala/org/xapek/influxdb/SizedTest.scala | 1 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala b/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala index 806c798..4473a47 100644 --- a/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala +++ b/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala @@ -2,31 +2,31 @@ package org.xapek.influxdb import org.junit._ import Assert._ -import org.xapek.influxdb.Influxdb._ +import org.xapek.influxdb.InfluxDB._ @Test class AppTest { @Test def testStatements() = { - val url = "http://localhost:8086/query" + val db = new InfluxDB("data", "localhost") - assertTrue((Influxdb.SELECT("foo") FROM "bla" WHERE col("a") == "asd") + assertTrue((SELECT("foo") FROM "bla" WHERE col("a") == "asd") .toString().contains("as")) - assertTrue((Influxdb.SELECT("foo")("bla") FROM "bla" WHERE col("a") == "asd") + assertTrue((SELECT("foo")("bla") FROM "bla" WHERE col("a") == "asd") .toString().contains("foo")) + + assertTrue((SELECT("foo")("bla") FROM "bla" WHERE col("b") == 1) + .toString().contains("\"b\" = 1")) - assertTrue((Influxdb.SELECT("foo")("bla") FROM "bla") - .toString().contains("== 1")) - - assertTrue((Influxdb - SELECT "foo" + assertTrue(( + SELECT("foo") FROM "bla" WHERE col("a") == "asd" || col("b") == "C" && col("c") == "d").toString().contains("bla")) - assertTrue((Influxdb - SELECT "foo" + assertTrue(( + SELECT("foo") FROM "bla" WHERE (col("a") == "asd" || col("b") == "C") && col("c") == "d").toString().contains("foo")) diff --git a/src/test/scala/org/xapek/influxdb/SizedTest.scala b/src/test/scala/org/xapek/influxdb/SizedTest.scala index 5f51e91..525ffd9 100644 --- a/src/test/scala/org/xapek/influxdb/SizedTest.scala +++ b/src/test/scala/org/xapek/influxdb/SizedTest.scala @@ -2,7 +2,6 @@ package org.xapek.influxdb import org.junit._ import org.junit.Assert._ -import org.xapek.influxdb.Influxdb._ @Test class SizedTest { |