129 lines
3.7 KiB
C++
Executable File
129 lines
3.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
*
|
|
* EXM Function Topic test executable
|
|
*
|
|
* ModuleTests for create/modify/remove marker
|
|
* ---------------------------------------------------
|
|
* Client FTC is implemented
|
|
*
|
|
* => (!) Preconditon:
|
|
* - Service svcMarkerManagent running
|
|
*
|
|
* -------------------------------------------------
|
|
*
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by hjl, SLSE, 2016-04-18
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Evaluations/evl_ftc.h>
|
|
#include <Evaluations/evl_ftc_types.h>
|
|
#include <Evaluations/evl_dtc.h>
|
|
#include <Evaluations/evl_dtc_types.h>
|
|
#include <Evaluations/logger.h>
|
|
|
|
#include <DDS/DDSConnector/dds_connector.h>
|
|
|
|
namespace Evaluations
|
|
{
|
|
class EvlTests : public QObject
|
|
, protected Evaluations::Interface::Ftc::EvlCriteriumModifyReplyHandler
|
|
, protected Evaluations::Interface::Ftc::EvlCriteriumRemoveReplyHandler
|
|
, protected Evaluations::Interface::Ftc::EvlElementModifyReplyHandler
|
|
, protected Evaluations::Interface::Ftc::EvlElementRemoveReplyHandler
|
|
, protected Evaluations::Interface::Ftc::SanNineLinerModifyReplyHandler
|
|
, protected Evaluations::Interface::Ftc::SanNineLinerRemoveReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit EvlTests(QObject *parent = nullptr);
|
|
~EvlTests() = default;
|
|
|
|
bool init(int domainId, int exerciseId, int testId, int operatorId, int criteriumId, int elementId, int sanNineLinerId);
|
|
bool testsSuccessful() const { return m_bTestsSuccessful; }
|
|
|
|
public Q_SLOTS:
|
|
void startTest();
|
|
|
|
protected Q_SLOTS:
|
|
// used to check FTC
|
|
void tryCreateCriterium();
|
|
void tryModifyCriterium();
|
|
void tryRemoveCriterium();
|
|
|
|
void tryCreateElement();
|
|
void tryModifyElement();
|
|
void tryRemoveElement();
|
|
|
|
// used to check DTC
|
|
void tryGetAllCriteria();
|
|
void tryGetCriterium();
|
|
void tryGetSanNineLiner();
|
|
|
|
void tryCreateSanNineLiner();
|
|
void tryModifySanNineLiner();
|
|
void tryRemoveSanNineLiner();
|
|
|
|
// used to check DTC signal/slot connection
|
|
void onReceiveCriteriumChanged(const EvaluationCriterium &data, DataModification modType);
|
|
|
|
protected:
|
|
NGL::INGLLogger &m_logger;
|
|
// Callbackfunctions for FTC
|
|
void onEvlCriteriumModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
void onEvlCriteriumRemoveReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
|
|
void onEvlElementModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
void onEvlElementRemoveReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
|
|
void onSanNineLinerModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
void onSanNineLinerRemoveReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
|
|
private Q_SLOTS:
|
|
bool onCompareCreatedData(EvaluationCriterium &data);
|
|
bool onCompareCreatedData(SanNineLiner &data);
|
|
|
|
private:
|
|
void getCriteriumModifyRequestData(EvlCriteriumModifyRequest &data);
|
|
void getSanNineLinerModifyRequestData(SanNineLinerModifyRequest &data);
|
|
void failExit();
|
|
|
|
private:
|
|
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
|
std::shared_ptr<Evaluations::Interface::Ftc> m_ftc;
|
|
std::shared_ptr<Evaluations::Interface::Dtc> m_dtc;
|
|
|
|
int m_exerciseId = 0;
|
|
int m_testId = 0;
|
|
int m_operatorId = 0;
|
|
int m_criteriumId = 0;
|
|
int m_elementId = 0;
|
|
int m_sanNineLinerId = 0;
|
|
|
|
enum TestStep
|
|
{
|
|
eUnknown,
|
|
eCreateCriterium,
|
|
eModifyCriterium,
|
|
eRemoveCriterium,
|
|
eGetAllCriteria,
|
|
eGetCriterium,
|
|
eCreateElement,
|
|
eModifyElement,
|
|
eRemoveElement,
|
|
eCreateSanNineLiner,
|
|
eModifySanNineLiner,
|
|
eRemoveSanNineLiner,
|
|
eGetSanNineLiner
|
|
}
|
|
m_eTestStep = eUnknown;
|
|
|
|
bool m_bTestsSuccessful = true;
|
|
};
|
|
|
|
} // namespace Evaluations
|