/** * @RDE_HEADER@ * * PPM Function Topic test executable * * ModuleTests for PPM function topics * --------------------------------------------------- * * => (!) Preconditons: * - Service svcParticipantManagement -e 0 running * * ------------------------------------------------- * * $Id$ * $HeadURL$ * $Author$ * * Created by Hannes Baeuerle, SLSE, 2015-07-18 */ #pragma once #include #include #include #include #include //---------------------------------------------------------------------------------- namespace ParticipantManagement { class PpmTests : public QObject , protected ParticipantManagement::Interface::Ftc::ModifyTypeReplyHandler , protected ParticipantManagement::Interface::Ftc::RemoveTypeReplyHandler , protected ParticipantManagement::Interface::Ftc::ModifyEquipmentTypeDataReplyHandler , protected ParticipantManagement::Interface::Ftc::ModifyParticipantDataReplyHandler , protected ParticipantManagement::Interface::Ftc::ModifyPartyDataReplyHandler , protected ParticipantManagement::Interface::Ftc::ModifyTemplateDataReplyHandler , protected ParticipantManagement::Interface::Ftc::RemovePartyReplyHandler , protected ParticipantManagement::Interface::Ftc::SyncPartiesReplyHandler , protected ParticipantManagement::Interface::Ftc::ChangePartyUsedStateReplyHandler , protected ParticipantManagement::Interface::Ftc::RegisterParticipantReplyHandler { Q_OBJECT public: explicit PpmTests(QObject *parent = nullptr); ~PpmTests(); bool init(int domainId, int exerciseId, int testId, int partyId, int typeId, int equipmentId, int participantId); bool testsSuccessful() const { return m_bTestsSuccessful; } public Q_SLOTS: void startTest(); protected Q_SLOTS: void tryCreateEquipmentType(); void tryCreateType(); void tryModifyType(); void tryRemoveType(); void tryCreateParticipant(); void tryCreateParty(); void tryModifyParty(); void tryRemoveParty(); void trySyncParties(); void tryChangeUsed(); void tryCreateTemplate(); void tryUpdateInfoParticipant(); void tryRegisterParticipant(); protected: void onModifyTypeReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); } void onRemoveTypeReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); } void onModifyEquipmentTypeDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); } void onModifyParticipantDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); } void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); } void onModifyTemplateDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); } void onRemovePartyReply(const Core::FunctionReplyObject &replyObject) override final; void onSyncPartiesReply(const Core::FunctionReplyObject &replyObject) override final; void onChangePartyUsedStateReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); } void onRegisterParticipantReply(const RegisterReply &reply) override final; // general void onError(const QString &reason); void onCreateReply(const Core::FunctionReplyObject &replyObject); void onModifyReply(const Core::FunctionReplyObject &replyObject); void onRemoveReply(const Core::FunctionReplyObject &replyObject); void failExit(); void successExit(); private: std::shared_ptr m_ddsConnector; std::shared_ptr m_ftc; std::shared_ptr m_dtc; int m_testId; int m_partyId; int m_typeId; int m_equipmentId; int m_participantId; bool m_bTestsSuccessful; LOGGER_T m_logger; }; } // namespace ParticipantManagement