From 874d5a4e72c4c5d5c846cca76ed2ecb70bebb2eb Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Wed, 5 Jun 2019 12:14:50 +0900 Subject: [PATCH] [NUI][Non-ACR] Fix NUI TCT Fail issue NUI is separated to Tizen.NUI and Tizen.NUI.Xaml Change-Id: I2da1f4a77c7571ae70ad5d70305c59d1cc488c59 Signed-off-by: huiyu.eun --- tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs | 10 +++++----- .../Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs | 2 +- tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs | 10 ++++------ tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs | 12 +++++------- tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs | 12 +++++------- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs index 7c63179..b08587a 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBindableProperty.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; using NUnit.Framework; -using Tizen.NUI.Binding; +using Tizen.NUI.XamlBinding; using Tizen.NUI.UIComponents; using Tizen.NUI.BaseComponents; @@ -161,7 +161,7 @@ namespace Tizen.NUI.Tests public void Create_CHECK_INSTANCE_EXPRESSION() { /* TEST CODE */ - var bindableProperty = BindableProperty.Create(b => b.LabelText, null, BindingMode.TwoWay); + var bindableProperty = BindableProperty.Create< Xaml.UIComponents.PushButton, string>(b => b.LabelText, null, BindingMode.TwoWay); Assert.IsNotNull(bindableProperty, "BindableProperty instance is null"); Assert.IsInstanceOf(bindableProperty, "Should be instance of BindableProperty."); } @@ -181,7 +181,7 @@ namespace Tizen.NUI.Tests BindableProperty.BindingPropertyChangingDelegate changingDelegate = (b, ov, nv) => { }; BindableProperty.CoerceValueDelegate coerceValueDelegate = (bindable, value) => value; - var bindableProperty = BindableProperty.Create(b => b.LabelText, null, BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate); + var bindableProperty = BindableProperty.Create< Xaml.UIComponents.PushButton, string>(b => b.LabelText, null, BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate); Assert.IsNotNull(bindableProperty, "BindableProperty instance is null"); Assert.IsInstanceOf(bindableProperty, "Should be instance of BindableProperty."); } @@ -306,7 +306,7 @@ namespace Tizen.NUI.Tests BindableProperty.BindingPropertyChangingDelegate changingDelegate = (b, ov, nv) => { }; BindableProperty.CoerceValueDelegate coerceValueDelegate = (bindable, value) => value; - var bindableProperty = BindableProperty.CreateReadOnly(b => b.LabelText, "Tizen", BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate); + var bindableProperty = BindableProperty.CreateReadOnly< Xaml.UIComponents.PushButton, string>(b => b.LabelText, "Tizen", BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate); Assert.IsNotNull(bindableProperty, "BindableProperty instance is null"); Assert.IsInstanceOf(bindableProperty, "Should be instance of BindableProperty."); } @@ -321,7 +321,7 @@ namespace Tizen.NUI.Tests public void CreateReadOnly_CHECK_INSTANCE_EXPRESSION_CREATE_DEFAULT_VALUE_DELEGATE() { /* TEST CODE */ - var bindableProperty = BindableProperty.CreateReadOnly(b => b.LabelText, "Tizen", BindingMode.TwoWay); + var bindableProperty = BindableProperty.CreateReadOnly< Xaml.UIComponents.PushButton, string>(b => b.LabelText, "Tizen", BindingMode.TwoWay); Assert.IsNotNull(bindableProperty, "BindableProperty instance is null"); Assert.IsInstanceOf(bindableProperty, "Should be instance of BindableProperty."); } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs index 480780d..85d9928 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSGetResourcesProvider.cs @@ -52,7 +52,7 @@ namespace Tizen.NUI.Tests public void Get_GET_VALUE() { /* TEST CODE */ - Tizen.NUI.Binding.ResourceDictionary dict = Tizen.NUI.GetResourcesProvider.Get().XamlResources; + Tizen.NUI.XamlBinding.ResourceDictionary dict = Tizen.NUI.GetResourcesProvider.Get().XamlResources; Assert.IsEmpty(dict, "Shoud be empty"); } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index 9b60fa4..c89b742 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -1156,13 +1156,11 @@ namespace Tizen.NUI.Tests Assert.IsNotNull(textEditor, "Can't create success object TextEditor"); Assert.IsInstanceOf(textEditor, "Should be an instance of TextEditor type."); - textEditor.SetValue(TextEditor.MatchSystemLanguageDirectionProperty, false); - bool ret = (bool)textEditor.GetValue(TextEditor.MatchSystemLanguageDirectionProperty); - Assert.AreEqual(false, ret, "should be same"); + textEditor.MatchSystemLanguageDirection = false; + Assert.AreEqual(false, textEditor.MatchSystemLanguageDirection, "should be same"); - textEditor.SetValue(TextEditor.MatchSystemLanguageDirectionProperty, true); - ret = (bool)textEditor.GetValue(TextEditor.MatchSystemLanguageDirectionProperty); - Assert.AreEqual(true, ret, "should be same"); + textEditor.MatchSystemLanguageDirection = true; + Assert.AreEqual(true, textEditor.MatchSystemLanguageDirection, "should be same"); } [Test] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index e361263..ee43b19 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -1198,13 +1198,11 @@ namespace Tizen.NUI.Tests Assert.IsNotNull(textField, "Can't create success object TextField"); Assert.IsInstanceOf(textField, "Should be an instance of TextField type."); - textField.SetValue(TextField.MatchSystemLanguageDirectionProperty, false); - bool ret = (bool)textField.GetValue(TextField.MatchSystemLanguageDirectionProperty); - Assert.AreEqual(false, ret, "should be same"); - - textField.SetValue(TextField.MatchSystemLanguageDirectionProperty, true); - ret = (bool)textField.GetValue(TextField.MatchSystemLanguageDirectionProperty); - Assert.AreEqual(true, ret, "should be same"); + textField.MatchSystemLanguageDirection = false; + Assert.AreEqual(false, textField.MatchSystemLanguageDirection, "should be same"); + + textField.MatchSystemLanguageDirection = true; + Assert.AreEqual(true, textField.MatchSystemLanguageDirection, "should be same"); } [Test] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index 73b49f4..61296f0 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -716,13 +716,11 @@ namespace Tizen.NUI.Tests Assert.IsNotNull(textLabel, "Can't create success object textLabel"); Assert.IsInstanceOf(textLabel, "Should be an instance of textLabel type."); - textLabel.SetValue(TextLabel.MatchSystemLanguageDirectionProperty, false); - bool ret = (bool)textLabel.GetValue(TextLabel.MatchSystemLanguageDirectionProperty); - Assert.AreEqual(false, ret, "should be same"); - - textLabel.SetValue(TextLabel.MatchSystemLanguageDirectionProperty, true); - ret = (bool)textLabel.GetValue(TextLabel.MatchSystemLanguageDirectionProperty); - Assert.AreEqual(true, ret, "should be same"); + textLabel.MatchSystemLanguageDirection = false; + Assert.AreEqual(false, textLabel.MatchSystemLanguageDirection, "should be same"); + + textLabel.MatchSystemLanguageDirection = true; + Assert.AreEqual(true, textLabel.MatchSystemLanguageDirection, "should be same"); } [Test] -- 2.7.4