diff UnitTestsSources/UnitTestsMain.cpp @ 80:f40a78cc7070 wasm

Oracle
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 May 2017 22:33:20 +0200
parents f5f54ed8d307
children cee8f308a4bc
line wrap: on
line diff
--- a/UnitTestsSources/UnitTestsMain.cpp	Wed May 24 21:23:29 2017 +0200
+++ b/UnitTestsSources/UnitTestsMain.cpp	Wed May 24 22:33:20 2017 +0200
@@ -21,9 +21,13 @@
 
 #include "gtest/gtest.h"
 
+#include "../Platforms/Generic/OracleWebService.h"
 #include "../Framework/Toolbox/OrthancAsynchronousWebService.h"
 #include "../Framework/Toolbox/OrthancSlicesLoader.h"
+#include "../Resources/Orthanc/Core/HttpClient.h"
 #include "../Resources/Orthanc/Core/Logging.h"
+#include "../Resources/Orthanc/Core/MultiThreading/SharedMessageQueue.h"
+#include "../Resources/Orthanc/Core/OrthancException.h"
 
 #include <boost/lexical_cast.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
@@ -36,7 +40,7 @@
   public:
     virtual void NotifyGeometryReady(const OrthancSlicesLoader& loader)
     {
-      printf(">> %d\n", loader.GetSliceCount());
+      printf(">> %d\n", (int) loader.GetSliceCount());
 
       for (size_t i = 0; i < loader.GetSliceCount(); i++)
       {
@@ -70,23 +74,28 @@
 
 TEST(Toto, Tutu)
 {
+  OrthancStone::Oracle oracle(4);
+  oracle.Start();
+
   Orthanc::WebServiceParameters web;
-  OrthancStone::OrthancAsynchronousWebService orthanc(web, 4);
-  orthanc.Start();
+  //OrthancStone::OrthancAsynchronousWebService orthanc(web, 4);
+  OrthancStone::OracleWebService orthanc(oracle, web);
+  //orthanc.Start();
 
   OrthancStone::Tata tata;
   OrthancStone::OrthancSlicesLoader loader(tata, orthanc);
-  //loader.ScheduleLoadSeries("c1c4cb95-05e3bd11-8da9f5bb-87278f71-0b2b43f5");
+  loader.ScheduleLoadSeries("c1c4cb95-05e3bd11-8da9f5bb-87278f71-0b2b43f5");
   //loader.ScheduleLoadSeries("67f1b334-02c16752-45026e40-a5b60b6b-030ecab5");
 
-  loader.ScheduleLoadInstance("19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5", 0);
+  //loader.ScheduleLoadInstance("19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5", 0);
 
   /*printf(">> %d\n", loader.GetSliceCount());
     loader.ScheduleLoadSliceImage(31);*/
 
   boost::this_thread::sleep(boost::posix_time::milliseconds(1000));
 
-  orthanc.Stop();
+  //orthanc.Stop();
+  oracle.Stop();
 }