Isolate Application object in Env:

This change causes each instance of Env to construct its own
isolated Application object for testing. Also included is
part of a framework to create multiple Application objects
in the same unit test and connect them together.
This commit is contained in:
Vinnie Falco
2015-09-17 10:18:01 -07:00
parent 19903674af
commit 9315d98aa9
20 changed files with 630 additions and 368 deletions

View File

@@ -175,6 +175,9 @@ public:
If the section does not exist, an empty section is returned.
*/
/** @{ */
Section&
section (std::string const& name);
Section const&
section (std::string const& name) const;
@@ -183,6 +186,12 @@ public:
{
return section(name);
}
Section&
operator[] (std::string const& name)
{
return section(name);
}
/** @} */
/** Overwrite a key/value pair with a command line argument

View File

@@ -96,6 +96,12 @@ BasicConfig::exists (std::string const& name) const
return map_.find(name) != map_.end();
}
Section&
BasicConfig::section (std::string const& name)
{
return map_[name];
}
Section const&
BasicConfig::section (std::string const& name) const
{