summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_cpplibrary/src/test/XMain.cpp
blob: 26d4069247774e9a1efd712ad6c9f0ed26d0ec75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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;
}