diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-27 12:41:33 +0700 |
---|---|---|
committer | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-27 12:41:33 +0700 |
commit | d9440a727edd25f2472754dc51b0206d6abbeba4 (patch) | |
tree | 1e7a123e5f28c7b5adfa4962971a550d247c28dd /src/test/scala/xyz/driver/pdsuicommon/parsers | |
parent | b27ba47906e48e9fc59d65893c71309303f73fc8 (diff) | |
parent | fde83eb31ef4f2c2334b41d3a727239c034bfd63 (diff) | |
download | rest-query-d9440a727edd25f2472754dc51b0206d6abbeba4.tar.gz rest-query-d9440a727edd25f2472754dc51b0206d6abbeba4.tar.bz2 rest-query-d9440a727edd25f2472754dc51b0206d6abbeba4.zip |
Merge branch 'master' into PDSUI-2336
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuicommon/parsers')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala b/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala index ac5eec1..0209222 100644 --- a/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala +++ b/src/test/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParserSuite.scala @@ -1,5 +1,7 @@ package xyz.driver.pdsuicommon.parsers +import java.util.UUID + import xyz.driver.pdsuicommon.db.SearchFilterExpr.Dimension import xyz.driver.pdsuicommon.db.{SearchFilterBinaryOperation, SearchFilterExpr, SearchFilterNAryOperation} import xyz.driver.pdsuicommon.utils.Implicits.toStringOps @@ -126,6 +128,14 @@ class SearchFilterParserSuite extends FreeSpecLike with Checkers { } } + "actual patientId uuid" - { + "should parse the full UUID as java.util.UUID type" in { + val filter = SearchFilterParser.parse(Seq("filters" -> "patientId EQ 4b4879f7-42b3-4b7c-a685-5c97d9e69e7c")) + assert(filter === Success(SearchFilterExpr.Atom.Binary( + Dimension(None, "patient_id"), Eq, UUID.fromString("4b4879f7-42b3-4b7c-a685-5c97d9e69e7c")))) + } + } + "all operators" - { "should be parsed with numeric values" in check { val testQueryGen = queryGen( |