diff UnitTestsSources/UnitTestsMain.cpp @ 307:be2660b6e40a am-callable-and-promise

wip: commands + status update
author am@osimis.io
date Tue, 25 Sep 2018 15:14:53 +0200
parents 9afafb192180
children ed7146fa2c98
line wrap: on
line diff
--- a/UnitTestsSources/UnitTestsMain.cpp	Tue Sep 18 18:20:10 2018 +0200
+++ b/UnitTestsSources/UnitTestsMain.cpp	Tue Sep 25 15:14:53 2018 +0200
@@ -26,6 +26,7 @@
 #include "../Framework/Layers/LayerSourceBase.h"
 #include "../Framework/Toolbox/DownloadStack.h"
 #include "../Framework/Toolbox/FiniteProjectiveCamera.h"
+#include "../Framework/Toolbox/MessagingToolbox.h"
 #include "../Framework/Toolbox/OrthancSlicesLoader.h"
 #include "../Framework/Volumes/ImageBuffer3D.h"
 #include "../Framework/Volumes/SlicedVolumeBase.h"
@@ -724,6 +725,12 @@
   */
 }
 
+TEST(MessagingToolbox, ParseJson)
+{
+  Json::Value response;
+  std::string source = "{\"command\":\"panel:takeDarkImage\",\"commandType\":\"simple\",\"args\":{}}";
+  ASSERT_TRUE(OrthancStone::MessagingToolbox::ParseJson(response, source.c_str(), source.size()));
+}
 
 int main(int argc, char **argv)
 {