testDBSelectionFail.cc
Go to the documentation of this file.
1 
12 #include <cppunit/extensions/HelperMacros.h>
13 
14 #include <fwk/CentralConfig.h>
15 #include <sdet/SManagerRegister.h>
16 #include <utl/Reader.h>
17 
18 #include "TestSQLManager.h"
19 
20 using namespace std;
21 using namespace det;
22 using namespace utl;
23 using namespace fwk;
24 using namespace sdet;
25 
26 
27 class DBSelectionTestFail : public CppUnit::TestFixture {
28 
29  CPPUNIT_TEST_SUITE(DBSelectionTestFail);
30  CPPUNIT_TEST_EXCEPTION(testSelectDB, IOFailureException);
31  CPPUNIT_TEST_SUITE_END();
32 
35 
36 public:
38  : CppUnit::TestFixture(), fgSQLManager(0), fCC(0) { }
39 
41  {
42  delete fgSQLManager;
43  }
44 
45  void
47  {
48  delete fgSQLManager;
49  fgSQLManager = new fwk::TestSQLManager;
50  fCC = CentralConfig::GetInstance(BOOTSTRAPFILE);
51  }
52 
53  void
55  {
56  delete fgSQLManager;
57  fgSQLManager = 0;
58  fCC = 0;
59  }
60 
61  void
63  {
64  Branch registerBranch = fCC->GetTopBranch("ManagerRegister");
65 
66  // (arbitrarily) test this using the SManagerRegister
67  //
68  SManagerRegister& reg = SManagerRegister::GetInstance(); // could be changed once object factory is replaced.
69  reg.Configure(registerBranch);
70  double foo = 0;
71  reg.GetData(foo, "bar", "baz", VManager::IndexMap());
72  }
73 
74 };
75 
76 
Branch GetTopBranch() const
Definition: Branch.cc:63
void Configure(const utl::Branch branch)
Configure the ManagerRegister from a Branch.
TestSQLManager * fgSQLManager
Status GetData(double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Dummy manager for Testing DB selection.
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
Base class to report exceptions in IO.
Class representing a document branch.
Definition: Branch.h:107
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
Main configuration utility.
Definition: CentralConfig.h:51
Singleton MangerRegister for the SD.

, generated on Tue Sep 26 2023.