diff --git a/cpp/src/tests/api/interface/database_interface_test.h b/cpp/src/tests/api/interface/database_interface_test.h index 7f41930e..c1bda817 100644 --- a/cpp/src/tests/api/interface/database_interface_test.h +++ b/cpp/src/tests/api/interface/database_interface_test.h @@ -434,6 +434,23 @@ TEST_P(DatabaseInterfaceTest, } } +TEST_P(DatabaseInterfaceTest, getGroupsPathShouldThrowIfAGroupIsNotDefined) { + auto& db = handle_->GetDatabase(); + + auto group1Name = "group1"; + auto group2Name = "group2"; + Group group1(group1Name, {group2Name}); + + db.SetUserGroups({group1}); + + try { + handle_->GetDatabase().GetGroupsPath(group1Name, group2Name); + FAIL(); + } catch (UndefinedGroupError& e) { + EXPECT_EQ(group2Name, e.GetGroupName()); + } +} + TEST_P(DatabaseInterfaceTest, getKnownBashTagsShouldReturnAllBashTagsListedInLoadedMetadata) { ASSERT_NO_THROW(GenerateMasterlist()); diff --git a/cpp/src/tests/api/interface/game_interface_test.h b/cpp/src/tests/api/interface/game_interface_test.h index 1b734d96..576cfe53 100644 --- a/cpp/src/tests/api/interface/game_interface_test.h +++ b/cpp/src/tests/api/interface/game_interface_test.h @@ -473,7 +473,12 @@ TEST_P(GameInterfaceTest, TEST_P(GameInterfaceTest, sortPluginsShouldThrowIfAGivenPluginIsNotLoaded) { std::vector plugins{blankEsp, blankDifferentEsp}; - EXPECT_THROW(handle_->SortPlugins(plugins), PluginNotLoadedError); + try { + handle_->SortPlugins(plugins); + FAIL(); + } catch (PluginNotLoadedError& e) { + EXPECT_STREQ("The plugin \"Blank.esp\" has not been loaded", e.what()); + } } TEST_P(GameInterfaceTest, sortPluginsShouldThrowIfACyclicInteractionOccurs) {