Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(TARGET svcIsmClient)
|
||||
IF(BUILD_TESTING)
|
||||
SET(SRCS_TEST
|
||||
ism_tests.cpp
|
||||
ism_tests.h
|
||||
../settings.h
|
||||
../settings.cpp
|
||||
)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(ismTests ${SRCS_TEST})
|
||||
TARGET_LINK_LIBRARIES(ismTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
RTI::nddscpp2
|
||||
ngldb
|
||||
nglsettings
|
||||
ngltools
|
||||
svcIsmClient
|
||||
svcIsmServer
|
||||
LtsCommandLineParser
|
||||
ddsconnector
|
||||
nglcoreapplication
|
||||
LtsUtilsCoreHeaderOnly
|
||||
)
|
||||
|
||||
IF(NOT BUILD_RPM)
|
||||
NGL_INSTALL(SV TARGETS ismTests DESTINATION bin/test)
|
||||
NGL_INSTALL(SV FILES ../log4cxx_ism.props DESTINATION bin/test)
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
+1229
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,26 @@
|
||||
Parameters,Comment
|
||||
-t 101,1. Create Main Structure Element
|
||||
-t 102 -m 1,2. Modify Main Structure Element
|
||||
-t 131,3. Create Instrumentation Assets
|
||||
-t 132 -a 2,4. Modify Instrumentation Assets
|
||||
-t 141 -s 8 -a 2,5. Create Mounting Point Asset
|
||||
-t 151,6. Create Mounting Point Schedule
|
||||
-t 152 -a 1,7. Modify Mounting Point Schedule
|
||||
-t 161 -a 1 -m 8 -s 9,8. Create Mounting Point Plan
|
||||
-t 162 -a 1 -s 9,9. Modify Mounting Point Plan
|
||||
-t 163 -a 1 -s 9,10. Remove Mounting Point Plan
|
||||
-t 153 -a 2,11. Remove Mounting Point Schedule (without MPPs)
|
||||
-t 153 -a 1,12. Remove Mounting Point Schedule (with MPPs)
|
||||
-t 143 -s 8 -a 2,13. Remove Mounting Point Asset
|
||||
-t 133 -a 1,14. Remove Instrumentation Asset (1)
|
||||
-t 133 -a 2,15. Remove Instrumentation Asset (2)
|
||||
-t 133 -a 3,16. Remove Instrumentation Asset (3)
|
||||
-t 133 -a 4,17. Remove Instrumentation Asset (4)
|
||||
-t 133 -a 5,18. Remove Instrumentation Asset (5)
|
||||
-t 101,19. Create Main Structure Element (prepare AVM)
|
||||
-t 131,20. Create Instrumentation Assets (prepare AVM tests)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* ISM Function Topic test executable
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Iuliana Ojog, SLSE, 2016-11-28
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <InfrastructureManagement/ism_ftc.h>
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
#include <InfrastructureManagement/ism_ftc_types.h>
|
||||
#include <InfrastructureManagement/ism_db.h>
|
||||
#include <InfrastructureManagement/ism_db_impl_custom.h>
|
||||
#include <InfrastructureManagement/logger.h>
|
||||
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <ngldb/db_service_handler.h>
|
||||
#include <ngldb/dbconnection.h>
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
using DbHandler = NGLDB::DbServiceHandler<DatabaseInterface>;
|
||||
class IsmTests : public QObject
|
||||
, protected InfrastructureManagement::Interface::Ftc::InstrumentationAssetModifyReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::InstrumentationAssetRemoveReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MountingPointAssetModifyReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MountingPointAssetRemoveReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MainScheduleModifyReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MainScheduleRemoveReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MountingPointPlanModifyReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MainStructureElementModifyReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MainStructureElementModifyBridgeStatusReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::MainStructureElementRemoveReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::StructureElementModifyReplyHandler
|
||||
, protected InfrastructureManagement::Interface::Ftc::InstrumentationAssetSetStateReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit IsmTests(QObject *parent = nullptr);
|
||||
~IsmTests();
|
||||
|
||||
bool init(int domainId, int testId, int assetId, int mainStructureElementId, int structureElementId, int indexNo);
|
||||
bool testsSuccessful() const { return m_bTestsSuccessful; }
|
||||
|
||||
public Q_SLOTS:
|
||||
void startTest();
|
||||
protected Q_SLOTS:
|
||||
// assets
|
||||
void tryCreateAsset();
|
||||
void tryModifyAsset();
|
||||
void tryRemoveAsset();
|
||||
void tryUnmountAsset();
|
||||
// main structure elements
|
||||
void tryCreateMainStructureElement();
|
||||
void tryModifyMainStructureElement();
|
||||
void tryRemoveMainStructureElement();
|
||||
void tryCreateBridge();
|
||||
void tryChangeBridgeStatus();
|
||||
// mounting point assets
|
||||
void tryCreateMountingPointAsset();
|
||||
void tryRemoveMountingPointAsset();
|
||||
// mounting point schedule
|
||||
void tryCreateMainSchedule();
|
||||
void tryModifyMainSchedule();
|
||||
void tryRemoveMainSchedule();
|
||||
void tryChangeStatusSchedule();
|
||||
void tryCopySchedule();
|
||||
void checkSchedule();
|
||||
// mounting point plan
|
||||
void tryCreateMountingPointPlan();
|
||||
|
||||
protected:
|
||||
// assets
|
||||
void onInstrumentationAssetModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
|
||||
void onInstrumentationAssetRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
|
||||
void onInstrumentationAssetSetStateReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
|
||||
|
||||
// main structure elements
|
||||
void onMainStructureElementModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
|
||||
void onMainStructureElementRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
|
||||
void onMainStructureElementModifyBridgeStatusReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
|
||||
|
||||
// structure elements
|
||||
void onStructureElementModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
|
||||
|
||||
// mounting point assets
|
||||
void onMountingPointAssetModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
|
||||
void onMountingPointAssetRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
|
||||
|
||||
// mounting point schedule
|
||||
void onMainScheduleModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
|
||||
void onMainScheduleRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
|
||||
|
||||
// mounting point plan
|
||||
void onMountingPointPlanModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
|
||||
|
||||
// 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();
|
||||
|
||||
private:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<InfrastructureManagement::DatabaseInterface> m_db;
|
||||
std::shared_ptr<InfrastructureManagement::DbHandler> m_dbHandler;
|
||||
|
||||
// given
|
||||
int m_testId;
|
||||
int m_assetId; // used for mounting point schedule id as well
|
||||
int m_mainStructureElementId;
|
||||
int m_structureElementId;
|
||||
int m_indexNo;
|
||||
// found per custom dtc methods
|
||||
int m_mountingPointAssetId;
|
||||
int m_mountingPointPlanId;
|
||||
bool m_bTestsSuccessful;
|
||||
bool m_replyFinished;
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
Reference in new issue
Block a user