diff options
author | Yatian XU <yatian.xu@nokia-sbell.com> | 2019-09-17 13:46:50 +0800 |
---|---|---|
committer | Yatian XU <yatian.xu@nokia-sbell.com> | 2019-09-17 05:57:44 +0000 |
commit | 1571a7c1dbecc320d9e0c6014c845a1fe1abe377 (patch) | |
tree | afdeaf900a48af837a0c3aeeac49fa8314df8ea4 /veslibrary/ves_cpplibrary/src/test/XMain.cpp | |
parent | 7966a4012c0eb263936e1b284801a79c5cb607a7 (diff) |
Contribute C++ implement of VES spec 7.0.1 to ONAP/vnfsdk:
Part5: test and code coverage
Issue-ID: VNFSDK-466
Signed-off-by: Yatian XU <yatian.xu@nokia-sbell.com>
Change-Id: Ia8188169188547b88ec586b68dbe5e42e7b28482
Diffstat (limited to 'veslibrary/ves_cpplibrary/src/test/XMain.cpp')
-rwxr-xr-x | veslibrary/ves_cpplibrary/src/test/XMain.cpp | 49 |
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;
+}
|