Skip to content
This repository was archived by the owner on Nov 24, 2022. It is now read-only.

Commit b92c2c6

Browse files
authored
Merge pull request #49 from leozz37/develop
Version v0.1
2 parents dc70acb + 0c10b5a commit b92c2c6

File tree

4 files changed

+48
-73
lines changed

4 files changed

+48
-73
lines changed

include/texugo/com/ConnectionManager.hpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class ConnectionManager
1515
ConnectionManager& operator=(const ConnectionManager& other) noexcept = delete;
1616
ConnectionManager& operator=(ConnectionManager&& other) noexcept = delete;
1717

18-
void createConnections(const std::unordered_map<std::string, std::string>& receiverAddresses,
19-
const std::unordered_map<std::string, std::string>& senderAddresses);
18+
void createConnections(const std::unordered_map<std::string, std::string>&,
19+
const std::unordered_map<std::string, std::string>&);
2020
void startConnections();
2121
void insertConnectionQueue(const std::string&, const std::string&);
2222

@@ -31,17 +31,12 @@ class ConnectionManager
3131
SENDER
3232
};
3333

34-
void createReceiverConnections(const std::unordered_map<std::string, std::string>&);
35-
void createSenderConnections(const std::unordered_map<std::string, std::string>&);
36-
3734
void createConnection(const std::unordered_map<std::string, std::string>&, CONNECTION_TYPE);
3835
void openReceiverConnections();
3936

40-
boost::asio::io_service m_ioService;
41-
42-
37+
inline static boost::asio::io_service m_ioService;
4338
inline static std::unordered_map<std::string, std::unique_ptr<ReceiverConnection>>
4439
m_receiverConnections;
4540
inline static std::unordered_map<std::string, std::unique_ptr<SenderConnection>>
4641
m_senderConnections;
47-
};
42+
};

tests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ CPMAddPackage(
88
VERSION 2.5.0)
99

1010
add_executable(texugo_tests
11-
com/ManagerTest.cpp
1211
config/SettingsTest.cpp
1312
main/main.cpp)
1413

tests/com/ManagerTest.cpp

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/config/SettingsTest.cpp

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,47 @@
1212
Settings *settings;
1313
};
1414

15-
//TEST_CASE_METHOD(SettingsFixture, "GetMongoPath") {
16-
// Settings testSettings(configPath);
17-
//
18-
// const std::string& result = testSettings.getMongoPath();
19-
// const std::string expected = settings->getMongoPath();
20-
//
21-
// REQUIRE(result == expected);
22-
// }
23-
//
24-
//TEST_CASE_METHOD(SettingsFixture, "GetLogPath") {
25-
// Settings testSettings(configPath);
26-
//
27-
// const std::string& result = testSettings.getLogPath();
28-
// const std::string expected = settings->getLogPath();
29-
//
30-
// REQUIRE(result == expected);
31-
// }
32-
33-
//TEST_CASE_METHOD(SettingsFixture, "GetMetricsAddress") {
34-
// Settings testSettings(configPath);
35-
//
36-
// const std::string& result = testSettings.getMetricsAddress();
37-
// const std::string expected = settings->getMetricsAddress();
38-
//
39-
// REQUIRE(result == expected);
40-
// }
41-
//
42-
//TEST_CASE_METHOD(SettingsFixture, "GetRoutingAddresses") {
43-
// Settings testSettings(configPath);
44-
//
45-
// const auto& result = testSettings.getReceiverAddresses();
46-
// const auto expected = settings->getReceiverAddresses();
47-
//
48-
// REQUIRE(result == expected);
49-
// }
15+
TEST_CASE_METHOD(SettingsFixture, "GetMongoPath") {
16+
Settings testSettings(configPath);
17+
18+
const std::string& result = testSettings.getMongoPath();
19+
const std::string expected = settings->getMongoPath();
20+
21+
REQUIRE(result == expected);
22+
}
23+
24+
TEST_CASE_METHOD(SettingsFixture, "GetLogPath") {
25+
Settings testSettings(configPath);
26+
27+
const std::string& result = testSettings.getLogPath();
28+
const std::string expected = settings->getLogPath();
29+
30+
REQUIRE(result == expected);
31+
}
32+
33+
TEST_CASE_METHOD(SettingsFixture, "GetMetricsAddress") {
34+
Settings testSettings(configPath);
35+
36+
const std::string& result = testSettings.getMetricsAddress();
37+
const std::string expected = settings->getMetricsAddress();
38+
39+
REQUIRE(result == expected);
40+
}
41+
42+
TEST_CASE_METHOD(SettingsFixture, "GetReceiverAddresses") {
43+
Settings testSettings(configPath);
44+
45+
const auto& result = testSettings.getReceiverAddresses();
46+
const auto expected = settings->getReceiverAddresses();
47+
48+
REQUIRE(result == expected);
49+
}
50+
51+
TEST_CASE_METHOD(SettingsFixture, "GetSenderAddresses") {
52+
Settings testSettings(configPath);
53+
54+
const auto& result = testSettings.getSenderAddresses();
55+
const auto expected = settings->getSenderAddresses();
56+
57+
REQUIRE(result == expected);
58+
}

0 commit comments

Comments
 (0)