summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/org/xapek/influxdb/InfluxdbTest.scala22
-rw-r--r--src/test/scala/org/xapek/influxdb/SizedTest.scala1
-rw-r--r--src/test/scala/simplelogger.properties34
3 files changed, 45 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 {
diff --git a/src/test/scala/simplelogger.properties b/src/test/scala/simplelogger.properties
new file mode 100644
index 0000000..a8665f6
--- /dev/null
+++ b/src/test/scala/simplelogger.properties
@@ -0,0 +1,34 @@
+# SLF4J's SimpleLogger configuration file
+# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
+
+# Default logging detail level for all instances of SimpleLogger.
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, defaults to "info".
+org.slf4j.simpleLogger.defaultLogLevel=trace
+
+# Logging detail level for a SimpleLogger instance named "xxxxx".
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, the default logging detail level is used.
+#org.slf4j.simpleLogger.log.xxxxx=
+
+# Set to true if you want the current date and time to be included in output messages.
+# Default is false, and will output the number of milliseconds elapsed since startup.
+#org.slf4j.simpleLogger.showDateTime=
+
+# The date and time format to be used in the output messages.
+# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
+# If the format is not specified or is invalid, the default format is used.
+# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
+#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+
+# Set to true if you want to output the current thread name.
+# Defaults to true.
+#org.slf4j.simpleLogger.showThreadName=true
+
+# Set to true if you want the Logger instance name to be included in output messages.
+# Defaults to true.
+#org.slf4j.simpleLogger.showLogName=true
+
+# Set to true if you want the last component of the name to be included in output messages.
+# Defaults to false.
+#org.slf4j.simpleLogger.showShortLogName=false