+
+int UtcDaliToolkitTextEditorUnderlineTypesGeneration1(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextEditorUnderlineTypesGeneration1");
+ TextEditor textEditor = TextEditor::New();
+ textEditor.SetProperty(TextEditor::Property::TEXT, "Test");
+ textEditor.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ textEditor.SetProperty(TextEditor::Property::POINT_SIZE, 10);
+ textEditor.SetProperty(TextEditor::Property::FONT_FAMILY, "DejaVu Sans");
+
+ application.GetScene().Add(textEditor);
+ application.SendNotification();
+ application.Render();
+
+ Property::Map underlineMapSet;
+ Property::Map underlineMapGet;
+
+ underlineMapSet.Insert("enable", true);
+ underlineMapSet.Insert("color", Color::RED);
+ underlineMapSet.Insert("height", 1);
+ underlineMapSet.Insert("type", Text::Underline::SOLID);
+ underlineMapSet.Insert("dashWidth", 2);
+ underlineMapSet.Insert("dashGap", 1);
+
+ // Check the underline property
+ textEditor.SetProperty(TextEditor::Property::UNDERLINE, underlineMapSet);
+
+ underlineMapGet = textEditor.GetProperty<Property::Map>(TextEditor::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ underlineMapSet.Clear();
+ underlineMapGet.Clear();
+
+ underlineMapSet.Insert("enable", true);
+ underlineMapSet.Insert("color", Color::BLUE);
+ underlineMapSet.Insert("height", 1);
+ underlineMapSet.Insert("type", Text::Underline::DASHED);
+ underlineMapSet.Insert("dashWidth", 4);
+ underlineMapSet.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ textEditor.SetProperty(TextEditor::Property::UNDERLINE, underlineMapSet);
+
+ underlineMapGet = textEditor.GetProperty<Property::Map>(TextEditor::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ underlineMapSet.Clear();
+ underlineMapGet.Clear();
+
+ underlineMapSet.Insert("enable", true);
+ underlineMapSet.Insert("color", Color::BLUE);
+ underlineMapSet.Insert("height", 1);
+ underlineMapSet.Insert("type", Text::Underline::DOUBLE);
+ underlineMapSet.Insert("dashWidth", 4);
+ underlineMapSet.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ textEditor.SetProperty(TextEditor::Property::UNDERLINE, underlineMapSet);
+
+ underlineMapGet = textEditor.GetProperty<Property::Map>(TextEditor::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet, underlineMapSet), true, TEST_LOCATION);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ underlineMapSet.Clear();
+ underlineMapGet.Clear();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextEditorUnderlineTypesGeneration2(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextEditorUnderlineTypesGeneration2");
+
+ TextEditor textEditor1 = TextEditor::New();
+ textEditor1.SetProperty(TextEditor::Property::TEXT, "Test");
+ textEditor1.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ textEditor1.SetProperty(TextEditor::Property::POINT_SIZE, 10);
+ textEditor1.SetProperty(TextEditor::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet1;
+ Property::Map underlineMapGet1;
+
+ underlineMapSet1.Insert("enable", true);
+ underlineMapSet1.Insert("color", Color::RED);
+ underlineMapSet1.Insert("height", 1);
+ underlineMapSet1.Insert("type", Text::Underline::SOLID);
+ underlineMapSet1.Insert("dashWidth", 2);
+ underlineMapSet1.Insert("dashGap", 1);
+
+ // Check the underline property
+ textEditor1.SetProperty(TextEditor::Property::UNDERLINE, underlineMapSet1);
+
+ underlineMapGet1 = textEditor1.GetProperty<Property::Map>(TextEditor::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet1.Count(), underlineMapSet1.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet1, underlineMapSet1), true, TEST_LOCATION);
+
+ application.GetScene().Add(textEditor1);
+ application.SendNotification();
+ application.Render();
+
+ TextEditor textEditor2 = TextEditor::New();
+ textEditor2.SetProperty(TextEditor::Property::TEXT, "Test");
+ textEditor2.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ textEditor2.SetProperty(TextEditor::Property::POINT_SIZE, 10);
+ textEditor2.SetProperty(TextEditor::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet2;
+ Property::Map underlineMapGet2;
+
+ underlineMapSet2.Insert("enable", true);
+ underlineMapSet2.Insert("color", Color::BLUE);
+ underlineMapSet2.Insert("height", 1);
+ underlineMapSet2.Insert("type", Text::Underline::DASHED);
+ underlineMapSet2.Insert("dashWidth", 4);
+ underlineMapSet2.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ textEditor2.SetProperty(TextEditor::Property::UNDERLINE, underlineMapSet2);
+
+ underlineMapGet2 = textEditor2.GetProperty<Property::Map>(TextEditor::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet2.Count(), underlineMapSet2.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet2, underlineMapSet2), true, TEST_LOCATION);
+
+ application.GetScene().Add(textEditor2);
+ application.SendNotification();
+ application.Render();
+
+ TextEditor textEditor3 = TextEditor::New();
+ textEditor3.SetProperty(TextEditor::Property::TEXT, "Test");
+ textEditor3.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ textEditor3.SetProperty(TextEditor::Property::POINT_SIZE, 10);
+ textEditor3.SetProperty(TextEditor::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet3;
+ Property::Map underlineMapGet3;
+
+ underlineMapSet3.Insert("enable", true);
+ underlineMapSet3.Insert("color", Color::BLUE);
+ underlineMapSet3.Insert("height", 1);
+ underlineMapSet3.Insert("type", Text::Underline::DOUBLE);
+ underlineMapSet3.Insert("dashWidth", 4);
+ underlineMapSet3.Insert("dashGap", 2);
+
+ // Check the dashed underline property
+ textEditor3.SetProperty(TextEditor::Property::UNDERLINE, underlineMapSet3);
+
+ underlineMapGet3 = textEditor3.GetProperty<Property::Map>(TextEditor::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet3.Count(), underlineMapSet3.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet3, underlineMapSet3), true, TEST_LOCATION);
+
+ application.GetScene().Add(textEditor3);
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextEditorUnderlineTypesGeneration3(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextEditorUnderlineTypesGeneration3");
+
+ TextEditor textEditor1 = TextEditor::New();
+ textEditor1.SetProperty(TextEditor::Property::TEXT, "Test1");
+ textEditor1.SetProperty(Actor::Property::SIZE, Vector2(200.0f, 100.f));
+ textEditor1.SetProperty(TextEditor::Property::POINT_SIZE, 10);
+ textEditor1.SetProperty(TextEditor::Property::FONT_FAMILY, "DejaVu Sans");
+
+ Property::Map underlineMapSet1;
+ Property::Map underlineMapGet1;
+
+ underlineMapSet1.Insert("enable", true);
+ underlineMapSet1.Insert("color", Color::RED);
+ underlineMapSet1.Insert("height", 1);
+ underlineMapSet1.Insert("type", Text::Underline::SOLID);
+ underlineMapSet1.Insert("dashWidth", 2);
+ underlineMapSet1.Insert("dashGap", 1);
+
+ // Check the underline property
+ textEditor1.SetProperty(TextEditor::Property::UNDERLINE, underlineMapSet1);
+ //textEditor1.SetProperty( TextEditor::Property::TEXT, "Test2" );
+
+ underlineMapGet1 = textEditor1.GetProperty<Property::Map>(TextEditor::Property::UNDERLINE);
+ DALI_TEST_EQUALS(underlineMapGet1.Count(), underlineMapSet1.Count(), TEST_LOCATION);
+ DALI_TEST_EQUALS(DaliTestCheckMaps(underlineMapGet1, underlineMapSet1), true, TEST_LOCATION);
+
+ application.GetScene().Add(textEditor1);
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}