Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+113
@@ -0,0 +1,113 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
*
|
||||
* EXM Function Topic test executable
|
||||
*
|
||||
* ModuleTests for create/modify/remove marker
|
||||
* ---------------------------------------------------
|
||||
* Client FTC is implemented
|
||||
*
|
||||
* => (!) Preconditon:
|
||||
* - Service svcOperatorManagent running
|
||||
*
|
||||
* -------------------------------------------------
|
||||
*
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by hjl, SLSE, 2016-04-18
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <OperatorManagement/opm_ftc.h>
|
||||
#include <OperatorManagement/opm_ftc_types.h>
|
||||
#include <OperatorManagement/opm_dtc.h>
|
||||
#include <OperatorManagement/opm_dtc_types.h>
|
||||
#include <OperatorManagement/logger.h>
|
||||
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
namespace OperatorManagement
|
||||
{
|
||||
class OpmTests : public QObject
|
||||
, protected OperatorManagement::Interface::Ftc::OperatorCreateModifyReplyHandler
|
||||
, protected OperatorManagement::Interface::Ftc::OperatorRemoveReplyHandler
|
||||
, protected OperatorManagement::Interface::Ftc::OperatorLoginReplyHandler
|
||||
, protected OperatorManagement::Interface::Ftc::OperatorLogoutReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit OpmTests(QObject *parent = nullptr);
|
||||
~OpmTests();
|
||||
|
||||
bool init(int domainId, int exerciseId, int testId, int operatorId, int createdId);
|
||||
bool testsSuccessful() const { return m_bTestsSuccessful; }
|
||||
|
||||
public Q_SLOTS:
|
||||
void startTest();
|
||||
|
||||
protected Q_SLOTS:
|
||||
// used to check FTC
|
||||
void tryCreate();
|
||||
void tryModify();
|
||||
void tryRemove();
|
||||
void tryLogin();
|
||||
void tryLoginForce();
|
||||
void tryLogout();
|
||||
void tryGetOperatorsByOperatorRight();
|
||||
|
||||
// used to check DTC
|
||||
void tryGetAllOperators();
|
||||
void tryGetOperator();
|
||||
|
||||
// used to check DTC signal/slot connection
|
||||
//ToDo: Parameter passen noch nicht!! int muss DataModification sein ... no compile..
|
||||
void onReceiveOperatorChanged(const User &data, DataModification modType);
|
||||
void onReceiveGroupChanged(const Group &data, DataModification modType);
|
||||
|
||||
protected:
|
||||
// Callbackfunctions for FTC
|
||||
void onOperatorCreateModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onOperatorRemoveReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onOperatorLoginReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onOperatorLogoutReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
private Q_SLOTS:
|
||||
bool onCompareCreatedData(User &data);
|
||||
bool onCompareModifiedData(User &data);
|
||||
private:
|
||||
void getOperatorCreateRequestData(OperatorCreateModifyRequest &data) const;
|
||||
void getOperatorModifyRequestData(OperatorCreateModifyRequest &data) const;
|
||||
void failExit();
|
||||
|
||||
private:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<OperatorManagement::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<OperatorManagement::Interface::Dtc> m_dtc;
|
||||
|
||||
qint32 m_exerciseId;
|
||||
int m_testId;
|
||||
int m_operatorId;
|
||||
int m_createdId;
|
||||
|
||||
enum TestStep
|
||||
{
|
||||
eUnknown,
|
||||
eCreate,
|
||||
eModify,
|
||||
eLogin,
|
||||
eLogout,
|
||||
eRemove,
|
||||
eGetAllOperators,
|
||||
eGetOperator,
|
||||
eGetOperatoryByOperatorRight
|
||||
} m_eTestStep;
|
||||
|
||||
bool m_bTestsSuccessful;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
} // namespace OperatorManagement
|
||||
Reference in new issue
Block a user