- END_TEST;
-}
-
-int UtcDaliButtonSize(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" UtcDaliButtonSize");
-
- // First an image is set, then SetSize is called.
- PushButton pushButton = PushButton::New();
- Stage::GetCurrent().Add( pushButton );
-
- pushButton.SetBackgroundImage( "Image.jpg" );
- pushButton.SetSize( 10.f, 10.f );
-
- application.SendNotification();
- application.Render();
-
- Vector3 size = pushButton.GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 10.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 10.f, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliButtonSetSelectedBackgroundImageP(void)
-{
- ToolkitTestApplication application;
-
- PushButton button = PushButton::New();
- Stage::GetCurrent().Add( button );
-
- try
- {
- button.SetSelectedBackgroundImage( "TestImage.jpg");
- DALI_TEST_CHECK( true );
- }
- catch(...)
- {
- DALI_TEST_CHECK( false );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetSelectedBackgroundImageN(void)
-{
- ToolkitTestApplication application;
-
- PushButton button;
-
- try
- {
- button.SetSelectedBackgroundImage( "TestImage.jpg");
- DALI_TEST_CHECK( false );
- }
- catch(...)
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetDisabledImageP(void)
-{
- ToolkitTestApplication application;
-
- PushButton button = PushButton::New();
- Stage::GetCurrent().Add( button );
-
- try
- {
- button.SetDisabledImage( "TestImage.jpg");
- DALI_TEST_CHECK( true );
- }
- catch(...)
- {
- DALI_TEST_CHECK( false );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetDisabledImageN(void)
-{
- ToolkitTestApplication application;
-
- PushButton button;
-
- try
- {
- button.SetDisabledImage( "TestImage.jpg");
- DALI_TEST_CHECK( false );
- }
- catch(...)
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetDisabledSelectedImageP(void)
-{
- ToolkitTestApplication application;
-
- PushButton button = PushButton::New();
- Stage::GetCurrent().Add( button );
-
- try
- {
- button.SetDisabledSelectedImage( "TestImage.jpg");
- DALI_TEST_CHECK( true );
- }
- catch(...)
- {
- DALI_TEST_CHECK( false );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetDisabledSelectedImageN(void)
-{
- ToolkitTestApplication application;
-
- PushButton button;
-
- try
- {
- button.SetDisabledSelectedImage( "TestImage.jpg");
- DALI_TEST_CHECK( false );
- }
- catch(...)
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetLabeActorlP(void)
-{
- ToolkitTestApplication application;
-
- PushButton button = PushButton::New();
- Stage::GetCurrent().Add( button );
-
- try
- {
- button.SetLabel( TextLabel::New("Hello") );
- DALI_TEST_CHECK( true );
- }
- catch(...)
- {
- DALI_TEST_CHECK( false );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetLabelN(void)
-{
- ToolkitTestApplication application;
-
- PushButton button;
-
- try
- {
- button.SetLabel( TextLabel::New("Hello") );
- DALI_TEST_CHECK( false );
- }
- catch(...)
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
-
-int UtcDaliButtonSetButtonImageP(void)
-{
- ToolkitTestApplication application;
-
- PushButton button = PushButton::New();
- Stage::GetCurrent().Add( button );
-
- try
- {
- ResourceImage image1 = ResourceImage::New( TEST_IMAGE_ONE );
- button.SetButtonImage( image1 );
-
- Property::Value value = button.GetProperty(Button::Property::UNSELECTED_STATE_IMAGE );
- DALI_TEST_CHECK( value.Get<std::string>() == TEST_IMAGE_ONE );
- }
- catch(...)
- {
- DALI_TEST_CHECK( false );
- }
-
- std::string imageUrl;
-
- Dali::Actor actor = button.GetButtonImage();
-
- Toolkit::ImageView imageView = Toolkit::ImageView ::DownCast( actor );
-
- tet_infoline(" UtcDaliButtonSetButtonImageP Ensure an ImageView is returned\n");
- DALI_TEST_CHECK ( imageView )
-
- END_TEST;
-}
-
-int UtcDaliButtonSetButtonImageN(void)
-{
- ToolkitTestApplication application;
-
- PushButton button;
-
- try
- {
- ResourceImage image1 = ResourceImage::New( TEST_IMAGE_ONE );
- button.SetButtonImage( image1 );
-
- DALI_TEST_CHECK( false );
- }
- catch(...)
- {
- DALI_TEST_CHECK( true );
- }