{
private const string tag = "NUITEST";
private static readonly Condition condition;
- private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "index.xml";
private void OnStatePropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
tlog.Debug(tag, $"DataTemplateConstructorWithType START");
string str = "myDataTemplate";
+#pragma warning disable Reflection // The code contains reflection
var testingTarget = new DataTemplate(str.GetType());
+#pragma warning restore Reflection // The code contains reflection
Assert.IsNotNull(testingTarget, "Can't create success object DataTemplate");
Assert.IsInstanceOf<DataTemplate>(testingTarget, "Should be an instance of DataTemplate type.");
tlog.Debug(tag, $"DataTemplateSetBinding START");
BindingBase binding = new Tizen.NUI.Binding.Binding() as BindingBase;
+#pragma warning disable Reflection // The code contains reflection
BindableProperty stateProperty = BindableProperty.CreateAttached("State", typeof(bool), typeof(XamlPropertyCondition), false, propertyChanged: OnStatePropertyChanged);
-
+#pragma warning restore Reflection // The code contains reflection
+
var testingTarget = new DataTemplate();
Assert.IsNotNull(testingTarget, "Can't create success object DataTemplate");
Assert.IsInstanceOf<DataTemplate>(testingTarget, "Should be an instance of DataTemplate type.");
}
catch (Exception e)
{
- Assert.Fail("SetBinding Fail!");
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
tlog.Debug(tag, $"DataTemplateSetBinding END (OK)");
{
testingTarget.SetBinding(null, binding);
}
- catch (ArgumentNullException e)
+ catch (ArgumentNullException)
{
tlog.Debug(tag, $"DataTemplateSetValueWithNullBindableProperty END (OK)");
Assert.Pass("Caught ArgumentNullException: Pass!");
{
tlog.Debug(tag, $"DataTemplateSetBindingWithNullBindingBase START");
+#pragma warning disable Reflection // The code contains reflection
BindableProperty stateProperty = BindableProperty.CreateAttached("State", typeof(bool), typeof(XamlPropertyCondition), false, propertyChanged: OnStatePropertyChanged);
+#pragma warning restore Reflection // The code contains reflection
var testingTarget = new DataTemplate();
Assert.IsNotNull(testingTarget, "Can't create success object DataTemplate");
{
testingTarget.SetBinding(stateProperty, null);
}
- catch (ArgumentNullException e)
+ catch (ArgumentNullException)
{
tlog.Debug(tag, $"DataTemplateSetValueWithNullBindableProperty END (OK)");
Assert.Pass("Caught ArgumentNullException: Pass!");
{
tlog.Debug(tag, $"DataTemplateSetValue START");
+#pragma warning disable Reflection // The code contains reflection
BindableProperty stateProperty = BindableProperty.CreateAttached("State", typeof(bool), typeof(XamlPropertyCondition), false, propertyChanged: OnStatePropertyChanged);
+#pragma warning restore Reflection // The code contains reflection
var testingTarget = new DataTemplate();
Assert.IsNotNull(testingTarget, "Can't create success object DataTemplate");
}
catch (Exception e)
{
- Assert.Fail("SetValue Fail!");
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
tlog.Debug(tag, $"DataTemplateSetValue END (OK)");
{
testingTarget.SetValue(null, true);
}
- catch (ArgumentNullException e)
+ catch (ArgumentNullException)
{
tlog.Debug(tag, $"DataTemplateSetValueWithNullBindableProperty END (OK)");
Assert.Pass("Caught ArgumentNullException: Pass!");
tlog.Debug(tag, $"DataTemplateSetupContentWithNullBindable START");
BindingBase binding = new Tizen.NUI.Binding.Binding() as BindingBase;
+#pragma warning disable Reflection // The code contains reflection
BindableProperty stateProperty = BindableProperty.CreateAttached("State", typeof(bool), typeof(XamlPropertyCondition), false, propertyChanged: OnStatePropertyChanged);
+#pragma warning restore Reflection // The code contains reflection
var testingTarget = new MyDataTemplateTest();
Assert.IsNotNull(testingTarget, "Can't create success object DataTemplate");
}
catch (Exception e)
{
- Assert.Fail("Fail!");
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
tlog.Debug(tag, $"DataTemplateSetupContentWithNullBindable END (OK)");