Mercurial > hg > orthanc
diff UnitTests/RestApi.cpp @ 281:e5402c368b21
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Dec 2012 17:49:14 +0100 |
parents | bd934af46ba4 |
children | 78a8eaa5f30b |
line wrap: on
line diff
--- a/UnitTests/RestApi.cpp Mon Dec 10 11:33:42 2012 +0100 +++ b/UnitTests/RestApi.cpp Mon Dec 10 17:49:14 2012 +0100 @@ -50,41 +50,3 @@ ASSERT_EQ("c", trail[2]); } } - - - -#if 0 - -#include "../Core/HttpServer/MongooseServer.h" - -struct Tutu : public IDynamicObject -{ - static void Toto(RestApi::GetCall& call) - { - printf("DONE\n"); - Json::Value a = Json::objectValue; - a["Tutu"] = "Toto"; - a["Youpie"] = call.GetArgument("coucou", "nope"); - a["Toto"] = call.GetUriComponent("test", "nope"); - call.GetOutput().AnswerJson(a); - } -}; - - - -TEST(RestApi, Tutu) -{ - MongooseServer httpServer; - httpServer.SetPortNumber(8042); - httpServer.Start(); - - RestApi* api = new RestApi; - httpServer.RegisterHandler(api); - api->Register("/coucou/{test}/a/*", Tutu::Toto); - - httpServer.Start(); - /*LOG(WARNING) << "REST has started"; - Toolbox::ServerBarrier();*/ -} - -#endif