+ DALI_TEST_EQUALS( button.GetProperty<bool>( button.GetPropertyIndex("selected")), true, TEST_LOCATION );
+
+ button.SetProperty( button.GetPropertyIndex("selected"), false );
+
+ DALI_TEST_EQUALS( button.GetProperty<bool>( button.GetPropertyIndex("selected")), false, TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliButtonSetLabelStringWithPropertyMapP(void)
+{
+ ToolkitTestApplication application;
+
+ Button button = PushButton::New();
+ button.SetProperty( Toolkit::Button::Property::LABEL,
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
+ .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
+ .Add( Toolkit::TextVisual::Property::TEXT, "Button Label")
+ );
+
+ DALI_TEST_EQUALS( GetButtonText( button ), "Button Label", TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliButtonSetLabelStringWithPropertyMapStringsP(void)
+{
+ ToolkitTestApplication application;
+
+ Button button = PushButton::New();
+
+ tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Setting Button text using String then replacing with Enum then string");
+
+ Property::Map textVisualMapInitial;
+ textVisualMapInitial["visualType"] = "TEXT";
+ textVisualMapInitial["pointSize"] = 15.0f;
+ textVisualMapInitial["text"] = "button label initial";
+
+ button.SetProperty( Button::Property::LABEL, textVisualMapInitial );
+
+ DALI_TEST_EQUALS( GetButtonText( button ), "button label initial", TEST_LOCATION );
+
+ tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Intermediate part of test");
+
+ Property::Map propertyMap;
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
+ propertyMap.Insert( Toolkit::TextVisual::Property::TEXT, "error if this is the final text" );
+ propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
+
+ button.SetProperty( Button::Property::LABEL, propertyMap );
+
+ DALI_TEST_EQUALS( GetButtonText( button ), "error if this is the final text", TEST_LOCATION );
+
+ tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Final part of test");
+
+ Property::Map textVisualMap;
+ textVisualMap["visualType"] = "TEXT";
+ textVisualMap["pointSize"] = 15.0f;
+ textVisualMap["text"] = "Button Label";
+
+ button.SetProperty( Toolkit::Button::Property::LABEL, textVisualMap );
+
+ DALI_TEST_EQUALS( GetButtonText( button ), "Button Label", TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliButtonSetLabelWithStringP(void)
+{
+ ToolkitTestApplication application;
+
+ Button button = PushButton::New();
+
+ // Set default point size for text visual as style sheet not available.
+ button.SetProperty( Toolkit::Button::Property::LABEL,
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
+ .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
+ );
+
+ button.SetProperty( Toolkit::Button::Property::LABEL, "Button Label" );
+
+ DALI_TEST_EQUALS( GetButtonText( button ), "Button Label", TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliButtonSetLabelPropertyP(void)
+{
+ ToolkitTestApplication application;
+
+ tet_infoline(" UtcDaliButtonSetLabelPropertyP Set text label and then set again with new text");
+
+
+ const std::string TEST_LABEL1 = "test label one";
+ const std::string TEST_LABEL2 = "test label two";
+
+ Button button = PushButton::New();
+
+ button.SetProperty( Toolkit::Button::Property::LABEL,
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
+ .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
+ .Add( Toolkit::TextVisual::Property::TEXT, TEST_LABEL1 )
+ );
+
+ DALI_TEST_EQUALS( GetButtonText( button ), TEST_LABEL1, TEST_LOCATION );
+
+ Property::Map propertyMap;
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT );
+ propertyMap.Insert( Toolkit::TextVisual::Property::TEXT, TEST_LABEL2 );
+ propertyMap.Insert( Toolkit::TextVisual::Property::TEXT_COLOR, Color::BLUE );
+ propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
+ button.SetProperty( Button::Property::LABEL, propertyMap );
+
+ DALI_TEST_EQUALS( GetButtonText( button ), TEST_LABEL2, TEST_LOCATION );
+
+ END_TEST;
+}
+
+int UtcDaliButtonPressedSignalP(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliButtonPressedSignalP");
+
+ Button button = PushButton::New();
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
+ button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
+
+ application.GetScene().Add( button );