/** * @RDE_HEADER@ * Module tests for SVC ReportManagement * $Id$ * $HeadURL$ * $Author$ * Created by Hanna E. Rathje, SLSE, 2015-09-10 */ #pragma once #include #include #include #include #include #include namespace NGLDB { template class DbServiceHandler; } namespace ReportManagement { using DbHandler = NGLDB::DbServiceHandler; class RepTests : public QObject , protected ReportManagement::Interface::Ftc::CreateModifyReportReplyHandler , protected ReportManagement::Interface::Ftc::RemoveReportReplyHandler , protected ReportManagement::Interface::Ftc::GetReportDataReplyHandler , protected ReportManagement::Interface::Ftc::ReportChangeStatusReplyHandler { Q_OBJECT public: explicit RepTests(QObject *parent = nullptr); ~RepTests(); bool init(int domainId, int exerciseId, int testId, int reportId, int operatorId); bool testsSuccessful() const { return m_bTestsSuccessful; } public Q_SLOTS: void startTest(); protected: void tryCreate(ReportManagement::ReportType repType, VisualisationType visType = VisualisationType::Table); void tryModify(); void tryGetData(); void tryDelete(); void tryChangeStatus(); void onCreateModifyReportReply(const CreateModifyReportReply &replyObject) override final; void onRemoveReportReply(const Core::FunctionReplyObject &replyObject) override final; void onGetReportDataReply(const GetReportDataReply &replyObject) override final; void onReportChangeStatusReply(const Core::FunctionReplyObject &replyObject) override final; void failExit(); void addTestDataTreatmentTimeline(); private: std::shared_ptr m_ddsConnector; std::shared_ptr m_dtc; std::shared_ptr m_ftc; std::shared_ptr m_dbHandler; std::shared_ptr m_db; qint32 m_exerciseId; int m_testId; int m_reportId; int m_operatorId; bool m_bTestsSuccessful; LOGGER_T m_logger; }; } // namespace