mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Add more basic tests.
This commit is contained in:
@@ -7,36 +7,10 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "DummyFileTree.h"
|
||||
|
||||
using namespace MOBase;
|
||||
|
||||
// filetree implementation for testing purpose
|
||||
//
|
||||
class DummyFileTree : public IFileTree {
|
||||
public:
|
||||
DummyFileTree(std::shared_ptr<const IFileTree> parent, QString name)
|
||||
: FileTreeEntry(parent, name), IFileTree()
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
std::shared_ptr<IFileTree> makeDirectory(std::shared_ptr<const IFileTree> parent,
|
||||
QString name) const override
|
||||
{
|
||||
return std::make_shared<DummyFileTree>(parent, name);
|
||||
}
|
||||
|
||||
bool doPopulate(std::shared_ptr<const IFileTree> parent,
|
||||
std::vector<std::shared_ptr<FileTreeEntry>>& entries) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
std::shared_ptr<IFileTree> doClone() const override
|
||||
{
|
||||
return std::make_shared<DummyFileTree>(nullptr, name());
|
||||
}
|
||||
};
|
||||
|
||||
TEST(IPluginInstaller, Simple)
|
||||
{
|
||||
const auto plugins_folder = QString(std::getenv("PLUGIN_DIR"));
|
||||
|
||||
Reference in New Issue
Block a user