X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Ftest_indc.h;fp=test%2Ftest_e2sm.h;h=a34761816a47d8a10397400be037f1e00d3ae159;hb=858eb3785ad300196cf677143a6759f857344702;hp=a973df204ccf9f9c19a7a2810aac8f22bb945e33;hpb=4edb52e022fe23b8951488c959458ad68b644d47;p=ric-app%2Fhw.git diff --git a/test/test_e2sm.h b/test/test_indc.h similarity index 80% rename from test/test_e2sm.h rename to test/test_indc.h index a973df2..a347618 100644 --- a/test/test_e2sm.h +++ b/test/test_indc.h @@ -27,12 +27,11 @@ #include #include -#include "e2ap_control_request.hpp" -#include "xapp.hpp" -#include "e2sm_control.hpp" #include "e2ap_indication.hpp" #include "e2sm_indication.hpp" +#include "e2ap_subscription_request.hpp" +#include "e2sm_subscription.hpp" using namespace std; TEST(E2SM, IndicationMessageEncode) { @@ -66,13 +65,14 @@ TEST(E2SM, IndicationMessageEncode) FILE * pFile; - pFile = fopen ("indication2.per","w"); + pFile = fopen ("indication1.per","w"); if (pFile!=NULL) { fwrite (buff , sizeof(char), buf_len, pFile); sleep(2); fclose (pFile); - } + sleep(2); + } } TEST(E2SM, IndicationMessageDecode) @@ -87,6 +87,7 @@ TEST(E2SM, IndicationMessageDecode) size_t e2ap_buff_size = fread(e2ap_buff, 1, 4096, fp); fclose(fp); + sleep(2); if(!e2ap_buff_size){ fprintf(stderr, "%s: Empty or broken\n", filename); exit(1); @@ -118,35 +119,6 @@ TEST(E2SM, IndicationMessageDecode) } -TEST(E2SM, ControlMessage) -{ - - unsigned char buff[1024]; - size_t buf_len = 1024; - - - - HWControlMessage msgObj; - msgObj.set_ricControlMessage("ControlMessage"); - - HWControlHeader headObj; - headObj.set_ricControlHeader(1); - - E2APControlMessage::ControlRequestIEs infoObj; - infoObj.set_ranFunctionID(1); - infoObj.set_ricRequestorID(1); - infoObj.set_ricControlHeader(headObj); - infoObj.set_ricControlMessage(msgObj); - infoObj.set_ricCallProcessID("ProcessID"); - - E2APControlMessage cntrlObj(infoObj); - - bool res = cntrlObj.encode(buff, &buf_len); - if(!res) - { - std::cout << cntrlObj.get_error() << std::endl; - } - ASSERT_TRUE(res); -} +/**/ #endif /* TEST_TEST_ASN_H_ */