diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2015-06-07 23:03:26 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2015-06-07 23:03:26 +0200 |
commit | d72dd2edaa58d3d7cf84d0b07f99337447514470 (patch) | |
tree | 4e9c37f683e81fe3a9b5564b1a78763120af0ab8 /src/test/scala/org/xapek | |
parent | bc8bf89edc3e24a756c1c9628087a5ae6f5af80a (diff) | |
download | influxdb-tools-d72dd2edaa58d3d7cf84d0b07f99337447514470.tar.gz influxdb-tools-d72dd2edaa58d3d7cf84d0b07f99337447514470.zip |
use Sized from shapeless
Diffstat (limited to 'src/test/scala/org/xapek')
-rw-r--r-- | src/test/scala/org/xapek/influxdb/InfluxdbTest.scala | 24 | ||||
-rw-r--r-- | src/test/scala/org/xapek/influxdb/SizedTest.scala | 22 |
2 files changed, 12 insertions, 34 deletions
diff --git a/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala b/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala index 4473a47..2ec83c3 100644 --- a/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala +++ b/src/test/scala/org/xapek/influxdb/InfluxdbTest.scala @@ -16,7 +16,7 @@ class AppTest { 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")) @@ -30,16 +30,16 @@ class AppTest { FROM "bla" WHERE (col("a") == "asd" || col("b") == "C") && col("c") == "d").toString().contains("foo")) - // assertTrue((Influxdb - // SELECT "foo" - // FROM "bla" - // WHERE (col("a") == "asd" || col("b") == "C") && col("c") == "d" - // GROUP_BY "asd").toString().contains("GROUP BY")) - - // assertTrue((Influxdb - // SELECT col("foo") - // FROM "bla" - // WHERE (col("a") == "asd" || col("b") == "C") && col("c") == "d" - // GROUP_BY "asd" <<= "asd2").toString().contains("asd2")) + assertTrue(( + SELECT("foo") + FROM "bla" + WHERE (col("a") == "asd" || col("b") == "C") && col("c") == "d" + GROUP_BY "asd").toString().contains("GROUP BY")) + + assertTrue((( + SELECT("foo") + FROM "bla" + WHERE (col("a") == "asd" || col("b") == "C") && col("c") == "d" + GROUP_BY ("asd"))("asdasd")).toString().contains("asdasd")) } } diff --git a/src/test/scala/org/xapek/influxdb/SizedTest.scala b/src/test/scala/org/xapek/influxdb/SizedTest.scala deleted file mode 100644 index 525ffd9..0000000 --- a/src/test/scala/org/xapek/influxdb/SizedTest.scala +++ /dev/null @@ -1,22 +0,0 @@ -package org.xapek.influxdb - -import org.junit._ -import org.junit.Assert._ - -@Test -class SizedTest { - @Test - def testStatements() = { - val s1 = SizedOp.wrap("abc") - assertEquals(1, SizedOp.count(s1)) - assertEquals(List("abc"), s1.unsized) - - val s2 = SizedOp.add(s1, "cde") - assertEquals(2, SizedOp.count(s2)) - assertEquals(List("abc", "cde"), s2.unsized) - - val s3 = SizedOp.add(s2, "fgh") - assertEquals(SizedOp.count(s3), 3) - assertEquals(List("abc", "cde", "fgh"), s3.unsized) - } -} |