mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user