diff OrthancFramework/UnitTestsSources/RestApiTests.cpp @ 4072:3dda0d73193c framework

fix doxygen, more tolerant WebServiceParameters::SetUrl()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 15 Jun 2020 16:28:03 +0200
parents e00f3d089991
children bf7b9edf6b81
line wrap: on
line diff
--- a/OrthancFramework/UnitTestsSources/RestApiTests.cpp	Mon Jun 15 12:26:45 2020 +0200
+++ b/OrthancFramework/UnitTestsSources/RestApiTests.cpp	Mon Jun 15 16:28:03 2020 +0200
@@ -873,3 +873,19 @@
     }
   }
 }
+
+
+TEST(WebServiceParameters, Url)
+{
+  WebServiceParameters w;
+  
+  ASSERT_THROW(w.SetUrl("ssh://coucou"), OrthancException);
+  w.SetUrl("http://coucou");
+  w.SetUrl("https://coucou");
+  ASSERT_THROW(w.SetUrl("httpss://coucou"), OrthancException);
+  ASSERT_THROW(w.SetUrl(""), OrthancException);
+
+  // New in Orthanc 1.7.2: Allow relative URLs (for DICOMweb in Stone)
+  w.SetUrl("coucou");
+  w.SetUrl("/coucou");
+}