Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* AES Function Topic Client test executable
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "aes_test_base.h"
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
class TestExplosionSingle : public TestBase
|
||||
, protected AreaEffectSimulation::Interface::Ftc::ExplosionSingleModifyReplyHandler
|
||||
, protected AreaEffectSimulation::Interface::Ftc::ExplosionSingleRemoveReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TestExplosionSingle(QObject *parent = nullptr);
|
||||
|
||||
bool init(int domainId, int exerciseId, int testId) override;
|
||||
public Q_SLOTS:
|
||||
void startTest() override { tryCreateExplosionSingle(); }
|
||||
private Q_SLOTS:
|
||||
void tryCreateExplosionSingle();
|
||||
void tryModifyExplosionSingle();
|
||||
void waitExpireExplosionSingle();
|
||||
protected Q_SLOTS:
|
||||
void explosionSingleChanged(const AreaEffectSimulation::ExplosionSingle &data, DataModification modType);
|
||||
protected:
|
||||
void onExplosionSingleModifyReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onExplosionSingleRemoveReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
|
||||
private:
|
||||
bool checkBaseData(const AreaEffectSimulation::ExplosionSingle &a,
|
||||
const AreaEffectSimulation::ExplosionSingle &b) const;
|
||||
|
||||
protected:
|
||||
AreaEffectSimulation::ExplosionSingle m_esData;
|
||||
};
|
||||
|
||||
|
||||
class TestExplosionSingleTestVWM final : public TestExplosionSingle
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TestExplosionSingleTestVWM(QObject *parent = nullptr);
|
||||
|
||||
void setName(const std::string &name) { m_name = name; }
|
||||
void setAmmoId(int ammoId) { m_ammoId = ammoId; }
|
||||
void setPosition(const Core::GeoPosition2D &position) { m_position = position; }
|
||||
|
||||
|
||||
public Q_SLOTS:
|
||||
void startTest() override
|
||||
{
|
||||
tryCreateExplosionSingleVWM(m_name, m_ammoId, m_position);
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
void tryCreateExplosionSingleVWM(const std::string &esName = "Norbert",
|
||||
int ammoId = 371,
|
||||
const Core::GeoPosition2D &position = Core::GeoPosition2D(0.202603, 0.916049)
|
||||
);
|
||||
|
||||
void onExplosionSingleCreateReply(const Core::FunctionReplyObject &replyObject);
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
int m_ammoId{-1};
|
||||
Core::GeoPosition2D m_position;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
Reference in new issue
Block a user