From bc8bf89edc3e24a756c1c9628087a5ae6f5af80a Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sun, 7 Jun 2015 00:50:45 +0200 Subject: first request worked. no result transformation yet --- .../scala/org/xapek/influxdb/InfluxdbTest.scala | 22 +++++++++++----------- src/test/scala/org/xapek/influxdb/SizedTest.scala | 1 - 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'src/test/scala/org/xapek') 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 { -- cgit v1.2.1