summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_cpplibrary/src/test/XMain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'veslibrary/ves_cpplibrary/src/test/XMain.cpp')
-rwxr-xr-xveslibrary/ves_cpplibrary/src/test/XMain.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/veslibrary/ves_cpplibrary/src/test/XMain.cpp b/veslibrary/ves_cpplibrary/src/test/XMain.cpp
new file mode 100755
index 0000000..26d4069
--- /dev/null
+++ b/veslibrary/ves_cpplibrary/src/test/XMain.cpp
@@ -0,0 +1,49 @@
+#include "XEventSamples.h"
+#include "XTransportSamples.h"
+#include "XLog.h"
+#include <iostream>
+#include <cstdlib>
+#include <vector>
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+ // common
+ vagt::log::init("/dev/null");
+ vagt::log::setLevel(log::XLogOff);
+
+ // encode
+ vector<shared_ptr<XSerialable>> events = {
+ buildFault(),
+ buildHeartbeat(),
+ buildMeasurement(),
+ buildNotification(),
+ buildOther(),
+ buildPnfRegistration(),
+ buildStateChange(),
+ buildSyslog(),
+ buildThresholdCrossingAlert(),
+ buildXVoiceQuality(),
+ buildBatch(),
+ buildMobileFlow(),
+ buildSipSignaling()
+ };
+
+ for (auto event : events)
+ {
+ event->toString();
+ }
+
+ //transport
+
+ testLibcurlTransport();
+ testRetryTransport();
+ testSwitchableTransport();
+ testMemBufferedTransport();
+ testDiskBufferedTransport();
+ testRpcClientTransport();
+ testRpcServerTransport();
+
+ return 0;
+}