MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / SetUp

Method SetUp

pj_app/tests/file_loader_test.cpp:564–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562class MessageBoxMarshalTest : public ::testing::Test {
563 protected:
564 void SetUp() override {
565 ASSERT_TRUE(extensions_dir_.isValid());
566 ASSERT_TRUE(data_dir_.isValid());
567 const QString src = QString::fromUtf8(PJ_MSGBOX_MOCK_SOURCE_PLUGIN_PATH);
568 const QString dst = extensions_dir_.filePath(QFileInfo(src).fileName());
569 ASSERT_TRUE(QFile::copy(src, dst)) << "could not stage " << src.toStdString();
570
571 app_session_ = std::make_unique<PJ::AppSession>(extensions_dir_.path());
572 ASSERT_FALSE(app_session_->extensionCatalog().findSourcesForExtension(QStringLiteral(".msgboxmock")).empty())
573 << "msgbox_mock_source_plugin did not load from the staged extensions dir";
574
575 loader_ = std::make_unique<PJ::FileLoader>(
576 app_session_->sessionManager(), app_session_->extensionCatalog(), app_session_->catalogModel());
577 }
578
579 QTemporaryDir extensions_dir_;
580 QTemporaryDir data_dir_;

Callers

nothing calls this directly

Calls 5

pathMethod · 0.60
isValidMethod · 0.45
emptyMethod · 0.45
sessionManagerMethod · 0.45

Tested by

no test coverage detected