X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-CheckBoxButton.cpp;h=07b810f59a8e5e8af6bdb7bb3ec090f85377523f;hb=4107c0f5ea45cd9e4e61d30c30e99de0e00287fc;hp=a8aca4807fc493ca69e6beff9cb21f18c3b74d35;hpb=6c8eb158ad2fb68a20bdcfabf8e07dd017da0528;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp index a8aca48..07b810f 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp @@ -147,3 +147,59 @@ int UtcDaliCheckBoxButtonSetGetSelected(void) DALI_TEST_CHECK( gCheckBoxButtonState ); END_TEST; } + +int UtcDaliCheckBoxSetLabelP(void) +{ + TestApplication application; + + CheckBoxButton checkBox = CheckBoxButton::New(); + + Property::Map propertyMap; + propertyMap.Insert("text", "activate"); + checkBox.SetProperty( checkBox.GetPropertyIndex("label"), propertyMap ); + + DALI_TEST_EQUALS( checkBox.GetLabelText(), "activate", TEST_LOCATION ); // Change to use GerProperty once that code is implemented + + END_TEST; +} + +int UtcDaliCheckBoxSetLabelDisabledP(void) +{ + TestApplication application; + + CheckBoxButton checkBox = CheckBoxButton::New(); + Stage::GetCurrent().Add( checkBox ); + + checkBox.SetSize( Vector2( 20.0f, 20.0f ) ); + checkBox.SetDisabledBackgroundImage( "Image.jpg" ); + + application.SendNotification(); + application.Render(); + + Property::Map propertyMap; + propertyMap.Insert("text", "activate"); + checkBox.SetProperty(checkBox.GetPropertyIndex("disabled"), true); + + checkBox.SetProperty( checkBox.GetPropertyIndex("label"), propertyMap ); + + DALI_TEST_CHECK( checkBox.GetProperty(checkBox.GetPropertyIndex("disabled")) ); + DALI_TEST_EQUALS( checkBox.GetLabelText(), "activate", TEST_LOCATION ); // Change to use GerProperty once that code is implemented + + END_TEST; +} + +int UtcDaliCheckBoxSettingDisabled(void) +{ + ToolkitTestApplication application; + + CheckBoxButton checkBox = CheckBoxButton::New(); + + checkBox.SetProperty(checkBox.GetPropertyIndex("disabled"), true); + DALI_TEST_CHECK( checkBox.GetProperty(checkBox.GetPropertyIndex("disabled")) ); + + checkBox.SetProperty(checkBox.GetPropertyIndex("disabled"), false); + + DALI_TEST_CHECK( !checkBox.GetProperty(checkBox.GetPropertyIndex("disabled")) ); + + END_TEST; +}