[Test]
[Category("P1")]
- [Description("Creates a new instance of the BindableProperty class.")]
- [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.Create<TDeclarer,TPropertyType> M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
- public void Create_CHECK_INSTANCE_EXPRESSION()
- {
- /* TEST CODE */
- var bindableProperty = BindableProperty.Create<TextLabel, string>(b => b.Text, null, BindingMode.TwoWay);
- Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
- Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
- }
-
- [Test]
- [Category("P1")]
- [Description("Creates a new instance of the BindableProperty class.")]
- [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.Create<TDeclarer,TPropertyType> M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
- public void Create_CHECK_INSTANCE_EXPRESSION_CREATE_DEFAULT_VALUE_DELEGATE()
- {
- /* TEST CODE */
- BindableProperty.ValidateValueDelegate<string> validateValueDelegate = (b, v) => true;
- BindableProperty.BindingPropertyChangedDelegate<string> changedDelegate = (b, ov, nv) => { };
- BindableProperty.BindingPropertyChangingDelegate<string> changingDelegate = (b, ov, nv) => { };
- BindableProperty.CoerceValueDelegate<string> coerceValueDelegate = (bindable, value) => value;
-
- var bindableProperty = BindableProperty.Create<TextLabel, string>(b => b.Text, null, BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate);
- Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
- Assert.IsInstanceOf<BindableProperty>(bindableProperty, "Should be instance of BindableProperty.");
- }
-
- [Test]
- [Category("P1")]
[Description("Creates a new instance of the BindableProperty class for an attached property.")]
[Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateAttached M")]
[Property("SPEC_URL", "-")]
Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
}
-
- [Test]
- [Category("P1")]
- [Description("Creates a new instance of the BindablePropertyKey class.")]
- [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateReadOnly<TDeclarer,TPropertyType> M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
- public void CreateReadOnly_CHECK_INSTANCE_EXPRESSION()
- {
- /* TEST CODE */
- BindableProperty.ValidateValueDelegate<string> validateValueDelegate = (b, v) => true;
- BindableProperty.BindingPropertyChangedDelegate<string> changedDelegate = (b, ov, nv) => { };
- BindableProperty.BindingPropertyChangingDelegate<string> changingDelegate = (b, ov, nv) => { };
- BindableProperty.CoerceValueDelegate<string> coerceValueDelegate = (bindable, value) => value;
-
- var bindableProperty = BindableProperty.CreateReadOnly<TextLabel, string>(b => b.Text, "Tizen", BindingMode.TwoWay, validateValueDelegate, changedDelegate, changingDelegate, coerceValueDelegate);
- Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
- Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
- }
-
- [Test]
- [Category("P1")]
- [Description("Creates a new instance of the BindablePropertyKey class.")]
- [Property("SPEC", "Tizen.NUI.Binding.BindableProperty.CreateReadOnly<TDeclarer,TPropertyType> M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Feng Jin, feng16.jin@partner.samsung.com")]
- public void CreateReadOnly_CHECK_INSTANCE_EXPRESSION_CREATE_DEFAULT_VALUE_DELEGATE()
- {
- /* TEST CODE */
- var bindableProperty = BindableProperty.CreateReadOnly<TextLabel, string>(b => b.Text, "Tizen", BindingMode.TwoWay);
- Assert.IsNotNull(bindableProperty, "BindableProperty instance is null");
- Assert.IsInstanceOf<BindablePropertyKey>(bindableProperty, "Should be instance of BindableProperty.");
- }
}
}