summaryrefslogtreecommitdiff
path: root/src/test/scala/org/xapek
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/org/xapek')
-rw-r--r--src/test/scala/org/xapek/influxdb/InfluxdbTest.scala22
-rw-r--r--src/test/scala/org/xapek/influxdb/SizedTest.scala1
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 {