Beispiel #1
0
TEST(IdsTest, gettersTest) {
	Id id = Id::loadFromString("qrm:/editor/diagram/element/id");

	EXPECT_EQ(id.editor(), "editor");
	EXPECT_EQ(id.diagram(), "diagram");
	EXPECT_EQ(id.element(), "element");
	EXPECT_EQ(id.id(), "id");
	EXPECT_EQ(id.type() ,Id("editor", "diagram", "element"));
}
Beispiel #2
0
LabelGenerator::LabelGenerator(const qrRepo::RepoApi &repo
		, GeneratorCustomizer &customizer
		, const Id &id
		, QObject *parent)
	: BindingGenerator(repo, customizer, id, "label.t"
			, { Binding::createStaticConverting("@@ID@@", id.id()
					, customizer.factory()->nameNormalizerConverter()) }
			, parent)
{
}
Beispiel #3
0
 std::string idToString(const Id &id) {
     TRACE(std::cout, "");
     return std::string("Id: {\nid: ")
         .append(string_utils::toString<int>(id.id()))
         .append("\n}\n");
 }
Beispiel #4
0
TEST(IdsTest, createElementIdTest) {
	Id id = Id::createElementId("diagram", "editor", "element");
	EXPECT_TRUE(id.id() != "");
}