testDBSelectionSuccess.cc
Go to the documentation of this file.
1 
12 #include <cppunit/extensions/HelperMacros.h>
13 
14 #include <fwk/CentralConfig.h>
15 
16 #include <sdet/SManagerRegister.h>
17 
18 #include <utl/Reader.h>
19 
20 #include "TestSQLManager.h"
21 
22 using namespace std;
23 using namespace det;
24 using namespace utl;
25 using namespace fwk;
26 using namespace sdet;
27 
28 
29 class DBSelectionTestSuccess : public CppUnit::TestFixture {
30 
31  CPPUNIT_TEST_SUITE(DBSelectionTestSuccess);
32  CPPUNIT_TEST(testSelectDB);
33  CPPUNIT_TEST_SUITE_END();
34 
37 
38 public:
39  void setUp() {
40  fgSQLManager = new fwk::TestSQLManager;
41  fCC = CentralConfig::GetInstance(BOOTSTRAPFILE);
42  }
43 
44  void tearDown() {
45  delete fgSQLManager;
46  }
47 
48  void testSelectDB() {
49 
50  Branch registerBranch = fCC->GetTopBranch("ManagerRegister");
51 
52  // (arbitrarily) test this using the SManagerRegister
53  //
54  SManagerRegister& reg = SManagerRegister::GetInstance(); // could be changed once object factory is replaced.
55  reg.Configure(registerBranch);
56  }
57 
58 };
59 
60 
Branch GetTopBranch() const
Definition: Branch.cc:63
void Configure(const utl::Branch branch)
Configure the ManagerRegister from a Branch.
Dummy manager for Testing DB selection.
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
Class representing a document branch.
Definition: Branch.h:107
fwk::TestSQLManager * fgSQLManager
Main configuration utility.
Definition: CentralConfig.h:51
Singleton MangerRegister for the SD.

, generated on Tue Sep 26 2023.