diff options
author | Vlad Uspensky <v.uspenskiy@icloud.com> | 2017-08-28 09:57:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-28 09:57:06 -0700 |
commit | f7621e318de56865b44a6a07ea45e37bbb3f80c1 (patch) | |
tree | ca6d966182e21d072895f7c32bea2fbc35bc2c23 /src/test/scala/xyz/driver/pdsuicommon | |
parent | 4512539b01e6e598d494246426b9eac261d10acf (diff) | |
parent | b249515292bfefbb70d1b5743ca46ced6da22a00 (diff) | |
download | rest-query-f7621e318de56865b44a6a07ea45e37bbb3f80c1.tar.gz rest-query-f7621e318de56865b44a6a07ea45e37bbb3f80c1.tar.bz2 rest-query-f7621e318de56865b44a6a07ea45e37bbb3f80c1.zip |
Merge pull request #21 from drivergroup/queryparsers
Added converting camel case to snake case for filters and sorting AST
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuicommon')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala b/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala index 5cd2dc9..9ca2343 100644 --- a/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala +++ b/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala @@ -9,6 +9,7 @@ import org.scalacheck.Arbitrary.arbitrary import org.scalacheck.{Gen, Prop} import org.scalatest.FreeSpecLike import org.scalatest.prop.Checkers +import xyz.driver.pdsuicommon.utils.Utils._ object SearchFilterParserSuite { @@ -30,8 +31,10 @@ class SearchFilterParserSuite extends FreeSpecLike with Checkers { Prop.forAllNoShrink(dimensionGen) { case (left, right) => val raw = s"$left.$right" - SearchFilterParser.dimensionParser.parse(raw) match { - case Parsed.Success(Dimension(Some(`left`), `right`), _) => true + val l = toSnakeCase(left) + val r = toSnakeCase(right) + SearchFilterParser.dimensionParser.parse(raw) match { + case Parsed.Success(Dimension(Some(`l`), `r`), _) => true case res => false } } |