ui: load source from directory via MenuBar
Added MenuBar action Project->New, which opens a directory dialog for choosing the new source directory to parse the files from. The ConfigManager can be created empty now and setValue calls can be used to set values. fortune cookie message = Your troubles will be faded by the luck you will soon have.
This commit is contained in:
@@ -71,6 +71,32 @@ public:
|
||||
TS_ASSERT(!value);
|
||||
}
|
||||
|
||||
void test_config_manager_adds_new_key_when_empty()
|
||||
{
|
||||
std::shared_ptr<ConfigManager> config = ConfigManager::createEmpty();
|
||||
|
||||
config->setValue("path/to/true_bool", true);
|
||||
|
||||
bool value = false;
|
||||
bool success(config->getValue("path/to/true_bool", value));
|
||||
|
||||
TS_ASSERT(success);
|
||||
TS_ASSERT(value);
|
||||
}
|
||||
|
||||
void test_config_manager_adds_new_key_when_not_empty()
|
||||
{
|
||||
std::shared_ptr<ConfigManager> config = ConfigManager::createAndLoad(getConfigTextAccess());
|
||||
|
||||
config->setValue("path/to/true_bool", true);
|
||||
|
||||
bool value = false;
|
||||
bool success(config->getValue("path/to/true_bool", value));
|
||||
|
||||
TS_ASSERT(success);
|
||||
TS_ASSERT(value);
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<TextAccess> getConfigTextAccess()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user