28 propertyDescriptions->
AddDescription(
"propertyName1",
"description1a");
29 propertyDescriptions->
AddDescription(
"propertyName1",
"description1b");
30 std::string description1 = propertyDescriptions->
GetDescription(
"propertyName1");
32 MITK_TEST_CONDITION(description1 ==
"description1a",
"Get description of \"propertyName1\"");
34 propertyDescriptions->
AddDescription(
"propertyName1",
"description1b",
"",
true);
35 description1 = propertyDescriptions->
GetDescription(
"propertyName1");
37 MITK_TEST_CONDITION(description1 ==
"description1b",
"Get overwritten description of \"propertyName1\"");
39 propertyDescriptions->
AddDescription(
"propertyName1",
"description1c",
"className");
40 std::string description2 = propertyDescriptions->
GetDescription(
"propertyName1",
"className");
41 description1 = propertyDescriptions->
GetDescription(
"propertyName1");
44 "Get description of \"propertyName1\" restricted to \"className\"");
virtual bool AddDescription(const std::string &propertyName, const std::string &description, const std::string &className="", bool overwrite=false)=0
Add a description for a specific property.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
static IPropertyDescriptions * GetPropertyDescriptions(us::ModuleContext *context=us::GetModuleContext())
Get an IPropertyDescriptions instance.
Interface of property descriptions service.
int mitkPropertyDescriptionsTest(int, char *[])
#define MITK_TEST_CONDITION(COND, MSG)
virtual std::string GetDescription(const std::string &propertyName, const std::string &className="", bool allowNameRegEx=true) const =0
Get the description for a specific property.