Skip to content

Commit

Permalink
added function definitions and initial per test case setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nedvedba committed Nov 12, 2024
1 parent e03e512 commit a69a6a0
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions core/server/tests/unit/test_GlobusAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// Local private includes
#include "GlobusAPI.hpp"
#include "Config.hpp"

// Local public includes
#include "common/DynaLog.hpp"
Expand All @@ -25,28 +26,38 @@ using namespace SDMS::Core;

class TestGlobusAPI: public GlobusAPI {
public:
TestGlobusAPI();
explicit TestGlobusAPI(LogContext log_context);
TestGlobusAPI() {
GlobusAPI::init()
}

~TestGlobusAPI();
~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<std::pair<std::string, std::string>> &a_params,
std::string &a_result);
std::string &a_result) {
return GlobusAPI::get(a_curl, a_base_url, a_url_path, a_token, a_params, 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<std::pair<std::string, std::string>> &a_params,
const libjson::Value *a_body, std::string &a_result);
const libjson::Value *a_body, std::string &a_result) {
return GlobusAPI::post(a_curl, a_base_url, a_url_path, a_token, a_params, a_body, a_result);
}
};

BOOST_AUTO_TEST_SUITE(GlobusAPITest)

BOOST_AUTO_TEST_CASE(testing_GlobusAPIPost) {
Config config = Config::getInstance();
TestGlobusAPI api();
BOOST_TEST(true);
}

BOOST_AUTO_TEST_CASE(testing_GlobusAPIGet) {
Config config = Config::getInstance();
TestGlobusAPI api();
BOOST_TEST(true);
}

Expand Down

0 comments on commit a69a6a0

Please sign in to comment.