comparison OrthancFramework/UnitTestsSources/FrameworkTests.cpp @ 4399:80fd140b12ba

New command-line option: "--openapi" to write the OpenAPI documentation of the REST API to a file
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Dec 2020 12:21:03 +0100
parents 52166629239f
children d9473bd5ed43
comparison
equal deleted inserted replaced
4398:38c22715bb56 4399:80fd140b12ba
785 785
786 ASSERT_FALSE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Patient)); 786 ASSERT_FALSE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Patient));
787 ASSERT_FALSE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Study)); 787 ASSERT_FALSE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Study));
788 ASSERT_FALSE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Series)); 788 ASSERT_FALSE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Series));
789 ASSERT_TRUE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Instance)); 789 ASSERT_TRUE(IsResourceLevelAboveOrEqual(ResourceType_Instance, ResourceType_Instance));
790
791 ASSERT_STREQ("Patients", GetResourceTypeText(ResourceType_Patient, true /* plural */, true /* upper case */));
792 ASSERT_STREQ("patients", GetResourceTypeText(ResourceType_Patient, true, false));
793 ASSERT_STREQ("Patient", GetResourceTypeText(ResourceType_Patient, false, true));
794 ASSERT_STREQ("patient", GetResourceTypeText(ResourceType_Patient, false, false));
795 ASSERT_STREQ("Studies", GetResourceTypeText(ResourceType_Study, true, true));
796 ASSERT_STREQ("studies", GetResourceTypeText(ResourceType_Study, true, false));
797 ASSERT_STREQ("Study", GetResourceTypeText(ResourceType_Study, false, true));
798 ASSERT_STREQ("study", GetResourceTypeText(ResourceType_Study, false, false));
799 ASSERT_STREQ("Series", GetResourceTypeText(ResourceType_Series, true, true));
800 ASSERT_STREQ("series", GetResourceTypeText(ResourceType_Series, true, false));
801 ASSERT_STREQ("Series", GetResourceTypeText(ResourceType_Series, false, true));
802 ASSERT_STREQ("series", GetResourceTypeText(ResourceType_Series, false, false));
803 ASSERT_STREQ("Instances", GetResourceTypeText(ResourceType_Instance, true, true));
804 ASSERT_STREQ("instances", GetResourceTypeText(ResourceType_Instance, true, false));
805 ASSERT_STREQ("Instance", GetResourceTypeText(ResourceType_Instance, false, true));
806 ASSERT_STREQ("instance", GetResourceTypeText(ResourceType_Instance, false, false));
790 } 807 }
791 808
792 809
793 #if defined(__linux__) || defined(__OpenBSD__) 810 #if defined(__linux__) || defined(__OpenBSD__)
794 #include <endian.h> 811 #include <endian.h>