Belle II Software light-2406-ragdoll
TestWithGearbox Class Reference

This class provides a test fixture managing the opening and closing of the Gearbox with the default geometry file. More...

#include <TestHelpers.h>

Inheritance diagram for TestWithGearbox:
Collaboration diagram for TestWithGearbox:

Static Public Member Functions

static void SetUpTestCase ()
 Sets up the Gearbox once for all test in this TestCase.
 
static void TearDownTestCase ()
 Closes the Gearbox once for all test in this TestCase.
 

Detailed Description

This class provides a test fixture managing the opening and closing of the Gearbox with the default geometry file.

Use like

TEST_F(TestWithGearBox, MyTest)
{
}

Definition at line 44 of file TestHelpers.h.

Member Function Documentation

◆ SetUpTestCase()

void SetUpTestCase ( )
static

Sets up the Gearbox once for all test in this TestCase.

Definition at line 25 of file TestHelpers.cc.

26{
27 //Setup the gearbox
28 Gearbox& gearbox = Gearbox::getInstance();
29
30 std::vector<std::string> backends;
31 backends.emplace_back("file:");
32 gearbox.setBackends(backends);
33
34 B2INFO("Start open gearbox.");
35 gearbox.open("geometry/Belle2.xml");
36 B2INFO("Finished open gearbox.");
37}
static Gearbox & getInstance()
Return reference to the Gearbox instance.
Definition: Gearbox.cc:81

◆ TearDownTestCase()

void TearDownTestCase ( )
static

Closes the Gearbox once for all test in this TestCase.

Definition at line 39 of file TestHelpers.cc.

40{
41 Gearbox& gearbox = Gearbox::getInstance();
42 gearbox.close();
43}

The documentation for this class was generated from the following files: