Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
// SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <FCConfig.h>
|
|
|
|
#include <App/Application.h>
|
|
#include <App/Document.h>
|
|
#include <App/Expression.h>
|
|
#include <App/ObjectIdentifier.h>
|
|
#include <Mod/Assembly/App/AssemblyObject.h>
|
|
#include <Mod/Assembly/App/JointGroup.h>
|
|
#include <src/App/InitApplication.h>
|
|
|
|
class AssemblyObjectTest: public ::testing::Test
|
|
{
|
|
protected:
|
|
static void SetUpTestSuite()
|
|
{
|
|
tests::initApplication();
|
|
}
|
|
|
|
void SetUp() override
|
|
{
|
|
_docName = App::GetApplication().getUniqueDocumentName("test");
|
|
auto _doc = App::GetApplication().newDocument(_docName.c_str(), "testUser");
|
|
_assemblyObj = _doc->addObject<Assembly::AssemblyObject>();
|
|
_jointGroupObj = _assemblyObj->addObject<Assembly::JointGroup>("jointGroupTest");
|
|
}
|
|
|
|
void TearDown() override
|
|
{
|
|
App::GetApplication().closeDocument(_docName.c_str());
|
|
}
|
|
|
|
Assembly::AssemblyObject* getObject()
|
|
{
|
|
return _assemblyObj;
|
|
}
|
|
|
|
private:
|
|
// TODO: use shared_ptr or something else here?
|
|
Assembly::AssemblyObject* _assemblyObj;
|
|
Assembly::JointGroup* _jointGroupObj;
|
|
std::string _docName;
|
|
};
|
|
|
|
TEST_F(AssemblyObjectTest, createAssemblyObject) // NOLINT
|
|
{
|
|
// Arrange
|
|
|
|
// Act
|
|
|
|
// Assert
|
|
}
|