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;
public void Create_CHECK_INSTANCE_EXPRESSION()
{
/* TEST CODE */
- var bindableProperty = BindableProperty.Create<PushButton, string>(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>(bindableProperty, "Should be instance of BindableProperty.");
}
BindableProperty.BindingPropertyChangingDelegate<string> changingDelegate = (b, ov, nv) => { };
BindableProperty.CoerceValueDelegate<string> coerceValueDelegate = (bindable, value) => value;
- var bindableProperty = BindableProperty.Create<PushButton, string>(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>(bindableProperty, "Should be instance of BindableProperty.");
}
BindableProperty.BindingPropertyChangingDelegate<string> changingDelegate = (b, ov, nv) => { };
BindableProperty.CoerceValueDelegate<string> coerceValueDelegate = (bindable, value) => value;
- var bindableProperty = BindableProperty.CreateReadOnly<PushButton, string>(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<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
}
public void CreateReadOnly_CHECK_INSTANCE_EXPRESSION_CREATE_DEFAULT_VALUE_DELEGATE()
{
/* TEST CODE */
- var bindableProperty = BindableProperty.CreateReadOnly<PushButton, string>(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<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
}
Assert.IsNotNull(textEditor, "Can't create success object TextEditor");
Assert.IsInstanceOf<TextEditor>(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]
Assert.IsNotNull(textField, "Can't create success object TextField");
Assert.IsInstanceOf<TextField>(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");\r
+\r
+ textField.MatchSystemLanguageDirection = true;
+ Assert.AreEqual(true, textField.MatchSystemLanguageDirection, "should be same");
}
[Test]
Assert.IsNotNull(textLabel, "Can't create success object textLabel");
Assert.IsInstanceOf<TextLabel>(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");\r
+\r
+ textLabel.MatchSystemLanguageDirection = true;
+ Assert.AreEqual(true, textLabel.MatchSystemLanguageDirection, "should be same");
}
[Test]