colosseum-near-rt-ric/setup/e2/RIC-E2-TERMINATION/TEST/ASN_LOG/LogTest.cpp
Leonardo Bonati 60dffad583 First commit
2021-12-08 20:17:46 +00:00

45 lines
1.1 KiB
C++

/*
* Copyright 2019 AT&T Intellectual Property
* Copyright 2019 Nokia
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// Created by adi ENZEL on 11/26/19.
//
#include "LogTest.h"
string LogTest::getLine() {
std::string line;
if (std::getline(file, line)) {
return line;
}
return "";
}
void LogTest::getJsonDoc(string json) {
if (json.length() != 0) {
document.Parse(json.c_str());
}
}
string LogTest::getBase64(Document &document) {
if (document.HasMember("asnBase64")) {
return document["asnBase64"].GetString();
}
return "";
}