53 lines
1.4 KiB
C++
Executable File
53 lines
1.4 KiB
C++
Executable File
/**
|
|
* ModuleTests for ASM
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AssetManagement/asm_ftc.h>
|
|
#include <AssetManagement/asm_ftc_types.h>
|
|
#include <AssetManagement/logger.h>
|
|
|
|
#include <DDS/DDSConnector/dds_connector.h>
|
|
#include <QObject>
|
|
|
|
namespace AssetManagement
|
|
{
|
|
class AsmTests : public QObject
|
|
, protected AssetManagement::Interface::Ftc::TrainingAreaModifyReplyHandler
|
|
, protected AssetManagement::Interface::Ftc::TrainingAreaRemoveReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AsmTests(QObject *parent = nullptr);
|
|
~AsmTests();
|
|
|
|
bool init(int domainId, int trainingAreaId, int testId);
|
|
bool testsSuccessful() const { return m_bTestsSuccessful; }
|
|
|
|
public Q_SLOTS:
|
|
void startTest();
|
|
protected Q_SLOTS:
|
|
void setRequestData(AssetManagement::TrainingAreaModifyRequest &request, int modId);
|
|
void tryCreate();
|
|
void tryModify();
|
|
void tryDelete();
|
|
protected:
|
|
void onTrainingAreaModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
void onTrainingAreaRemoveReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
void failExit();
|
|
private:
|
|
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
|
std::shared_ptr<AssetManagement::Interface::Ftc> m_ftc;
|
|
qint32 m_trainingAreaId;
|
|
int m_testId;
|
|
bool m_bTestsSuccessful;
|
|
LOGGER_T m_logger;
|
|
|
|
};
|
|
|
|
} // namespace AssetManagement
|