From e03e5123a02fe4fc72567141153241057f6a8ca0 Mon Sep 17 00:00:00 2001 From: Blake Nedved Date: Mon, 11 Nov 2024 05:56:05 -0500 Subject: [PATCH] moved test class definition into test file --- core/server/TestGlobusAPI.hpp | 43 ----------------------- core/server/tests/unit/test_GlobusAPI.cpp | 27 +++++++++++++- 2 files changed, 26 insertions(+), 44 deletions(-) delete mode 100644 core/server/TestGlobusAPI.hpp diff --git a/core/server/TestGlobusAPI.hpp b/core/server/TestGlobusAPI.hpp deleted file mode 100644 index fd72fdf8..00000000 --- a/core/server/TestGlobusAPI.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef TESTGLOBUSAPICLIENT_HPP -#define TESTGLOBUSAPICLIENT_HPP -#pragma once - -// Local private includes -#include "GlobusAPI.hpp" - -// Local public includes -#include "common/DynaLog.hpp" -#include "common/SDMS.pb.h" -#include "common/libjson.hpp" - -// Third party includes -#include - -// Standard includes -#include -#include - -namespace SDMS { -namespace Core { - -class TestGlobusAPI: GlobusAPI { - TestGlobusAPI(); - explicit TestGlobusAPI(LogContext log_context); - - ~TestGlobusAPI(); - -public: - long get(CURL *a_curl, const std::string &a_base_url, - const std::string &a_url_path, const std::string &a_token, - const std::vector> &a_params, - std::string &a_result); - long post(CURL *a_curl, const std::string &a_base_url, - const std::string &a_url_path, const std::string &a_token, - const std::vector> &a_params, - const libjson::Value *a_body, std::string &a_result); -}; - -} // namespace Core -} // namespace SDMS - -#endif diff --git a/core/server/tests/unit/test_GlobusAPI.cpp b/core/server/tests/unit/test_GlobusAPI.cpp index db43cb87..e1c8a1b9 100644 --- a/core/server/tests/unit/test_GlobusAPI.cpp +++ b/core/server/tests/unit/test_GlobusAPI.cpp @@ -2,19 +2,44 @@ #define BOOST_TEST_MODULE globusapi -// Local includes +// Local private includes +#include "GlobusAPI.hpp" + +// Local public includes +#include "common/DynaLog.hpp" +#include "common/libjson.hpp" // Third party includes +#include #include #include #include // Standard includes +#include +#include #include #include using namespace SDMS::Core; +class TestGlobusAPI: public GlobusAPI { +public: + TestGlobusAPI(); + explicit TestGlobusAPI(LogContext log_context); + + ~TestGlobusAPI(); + + long get(CURL *a_curl, const std::string &a_base_url, + const std::string &a_url_path, const std::string &a_token, + const std::vector> &a_params, + std::string &a_result); + long post(CURL *a_curl, const std::string &a_base_url, + const std::string &a_url_path, const std::string &a_token, + const std::vector> &a_params, + const libjson::Value *a_body, std::string &a_result); +}; + BOOST_AUTO_TEST_SUITE(GlobusAPITest) BOOST_AUTO_TEST_CASE(testing_GlobusAPIPost) {