From 1571a7c1dbecc320d9e0c6014c845a1fe1abe377 Mon Sep 17 00:00:00 2001 From: Yatian XU Date: Tue, 17 Sep 2019 13:46:50 +0800 Subject: 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 Change-Id: Ia8188169188547b88ec586b68dbe5e42e7b28482 --- veslibrary/ves_cpplibrary/src/test/XMain.cpp | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 veslibrary/ves_cpplibrary/src/test/XMain.cpp (limited to 'veslibrary/ves_cpplibrary/src/test/XMain.cpp') 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 +#include +#include + +using namespace std; + +int main(int argc, char** argv) +{ + // common + vagt::log::init("/dev/null"); + vagt::log::setLevel(log::XLogOff); + + // encode + vector> 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; +} -- cgit 1.2.3-korg