--- /dev/null
+using Tizen.NUI.Devel.Tests;
+using Tizen.NUI.Xaml;
+
+[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
+[assembly: Preserve(AllMembers = true)]
+
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ [AttributeUsage(AttributeTargets.All)]
+ public class PreserveAttribute : Attribute
+ {
+ public bool AllMembers;
+ public bool Conditional;
+
+ public PreserveAttribute()
+ {
+ }
+
+ public PreserveAttribute(bool allMembers, bool conditional)
+ {
+ AllMembers = allMembers;
+ Conditional = conditional;
+ }
+ }
+}
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>None</DebugType>
</PropertyGroup>
+ <ItemGroup>
+ <None Remove="res\layout\BaseXamlSample.xaml" />
+ <None Remove="res\layout\BaseXamlSample3.xaml" />
+ <None Remove="res\layout\BindingSample.xaml" />
+ <None Remove="res\layout\MyResourceDictionary.xaml" />
+ <None Remove="testcase\public\Xaml\TotalSample\BaseXamlSample2.xaml" />
+ <None Remove="testcase\public\Xaml\TotalSample\ClockView.xaml" />
+ <None Remove="testcase\public\Xaml\TotalSample\HslColorScrollView.xaml" />
+ <None Remove="testcase\public\Xaml\TotalSample\StaticDateTimeView.xaml" />
+ <None Remove="testcase\public\Xaml\TotalSample\TotalSample.xaml" />
+ <None Remove="testcase\public\Xaml\TotalSample\XamlStyleSample.xaml" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="res\layout\MyResourceDictionary.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="res\layout\BaseXamlSample3.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="res\layout\BaseXamlSample.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="res\layout\BindingSample.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="res\layout\XamlStyleSample.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="res\layout\TotalSample.xaml" />
+ <EmbeddedResource Include="testcase\public\Xaml\TotalSample\BaseXamlSample2.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="testcase\public\Xaml\TotalSample\ClockView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="testcase\public\Xaml\TotalSample\HslColorScrollView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="testcase\public\Xaml\TotalSample\StaticDateTimeView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
<ItemGroup>
<Folder Include="lib\" />
+ <Folder Include="res\examl\" />
</ItemGroup>
<Import Project="..\Common\dependencies.props" />
--- /dev/null
+(d0d ("Tizen.NUI.Devel.Tests, " ))
+(d0d ("Tizen.NUI, " ))
+(d0d ("System.Collections, " ))
+(d0d ("System.Runtime, " ))
+(d1d (d0d "Tizen.NUI.Devel.Tests.TotalSample"))
+(d1d (d1d "Tizen.NUI.BaseComponents.View"))
+(d1d (d0d "Tizen.NUI.Devel.Tests.FloatToStringConverter"))
+(d1d (d1d "Tizen.NUI.Binding.Setter"))
+(d1d (d1d "Tizen.NUI.BaseComponents.ImageView"))
+(d1d (d1d "Tizen.NUI.Binding.Trigger"))
+(d1d (d1d "Tizen.NUI.Binding.XamlStyle"))
+(d1d (d1d "Tizen.NUI.Binding.ResourceDictionary"))
+(d1d (d0d "Tizen.NUI.Devel.Tests.UIElement+TestEnum"))
+(d1d (d2d "System.Collections.Generic.List`1" (d-11d )))
+(d1d (d0d "Tizen.NUI.Devel.Tests.UIElement"))
+(d1d (d1d "Tizen.NUI.Binding.BindableObject"))
+(d1d (d2d "System.Collections.Generic.List`1" (d-12d )))
+(d1d (d1d "Tizen.NUI.Xaml.ApplicationResourcePathExtension"))
+(d1d (d0d "Tizen.NUI.Devel.Tests.CustomList"))
+(d1d (d0d "Tizen.NUI.Devel.Tests.UIElement+TestNestType"))
+(d1d (d1d "Tizen.NUI.Binding.Binding"))
+(d1d (d1d "Tizen.NUI.Binding.SizeTypeConverter"))
+(d1d (d1d "Tizen.NUI.Size"))
+(d1d (d3d "System.EventArgs"))
+(d2d (d1d "XamlResources" ))
+(d2d (d3d "Property" ))
+(d2d (d3d "Value" ))
+(d2d (d5d "Property" ))
+(d2d (d5d "Value" ))
+(d2d (d10d "StrList" ))
+(d2d (d10d "Child" ))
+(d2d (d11d "BindingContext" ))
+(d2d (d1d "Size" ))
+(d2d (d10d "CustomBindableProperty" ))
+(d2d (d13d "FilePath" ))
+(d2d (d10d "CustomList" ))
+(d3d (d10d "Event" ))
+(d4d (d10d "FactoryMethod" (d-4d d-11d d-15d )))
+(d4d (d10d "FactoryMethodWithoutParams" ()))
+(d4d (d1d "Add" (d1d )))
+(d4d (d0d "UIElementEvent" (d-12d d19d )))
+(d4d (d0d "StaticUIElementEvent" (d-12d d19d )))
+(d5d (d10d "StringPProperty" ))
+(d5d (d1d "PositionProperty" ))
+(d5d (d1d "SizeProperty" ))
+(d6d (d0d d-1d ))
+(d6d (d2d d-1d ))
+(d6d (d3d d-1d ))
+(d10d (d4d ))
+(d6d (d5d d-1d (a3a )))
+(d6d (d3d d-1d ))
+(d10d (d4d ))
+(d6d (d5d d-1d (a6a )))
+(d10d (d4d ))
+(d6d (d6d d-1d (a8a )))
+(d6d (d7d d-1d ))
+(d12d (d8d "V1" ))
+(d6d (d9d d-1d ))
+(d6d (d10d d-1d (a11a )))
+(d9d (d10d "StaticChild" zz ))
+(d6d (d10d d-1d ))
+(d6d (d10d d-1d ('c' )))
+(d6d (d10d d-1d ))
+(d6d (d10d d-1d ))
+(d6d (d10d d-1d ))
+(d6d (d12d d-1d ))
+(d20d (d20d d123d ))
+(d20d (d20d h123h ))
+(d20d (d20d e123e ))
+(d20d (d20d e123e ))
+(d20d (d20d j123j ))
+(d20d (d20d k123k ))
+(d20d (d20d mFalsem ))
+(d20d (d20d l01:02:03l ))
+(d20d (d20d 'c' ))
+(d20d (d20d c1c ))
+(d20d (d20d c1c ))
+(d20d (d20d f1f ))
+(d20d (d20d b1b ))
+(d20d (d20d "http://www.samsung.net/" ))
+(d20d (d20d n123n ))
+(d6d (d10d d-1d (a20a )))
+(d6d (d13d d-1d ))
+(d6d (d10d d-1d ))
+(d6d (d13d d-1d ))
+(d6d (d14d d-1d ))
+(d6d (d10d d-1d ))
+(d6d (d15d d-1d (d0d )))
+(d6d (d10d d-1d (a27a )))
+(d6d (d10d d-1d ))
+(d6d (d10d d-1d (a29a )))
+(d6d (d10d d0d (d1d "str" j2j )))
+(d6d (d10d d1d ))
+(d23d (a16a "t1" ))
+(d23d (a17a "t2" ))
+(d23d (a18a "t3" ))
+(d14d (d0d d0d a10a ))
+(d22d (d10d "floatToStringConverter" a1a ))
+(d22d (d10d "positionKey" "200, 200" ))
+(d9d (d4d zz "ResourceUrlProperty" ))
+(d14d (d4d d3d a33a ))
+(d14d (d4d d4d "*Resource*/arrow.jpg" ))
+(d9d (d1d zz "PositionXProperty" ))
+(d14d (d2d d1d a34a ))
+(d14d (d2d d2d "200" ))
+(d13d (d4d "Setters" ))
+(d21d (d0d a2a ))
+(d13d (d9d "Triggers" ))
+(d21d (d1d a4a ))
+(d9d (d4d zz "ResourceUrlProperty" ))
+(d14d (d7d d3d a35a ))
+(d14d (d7d d4d "*Resource*/arrow.jpg" ))
+(d9d (d1d zz "PositionXProperty" ))
+(d14d (d5d d1d a36a ))
+(d14d (d5d d2d "500" ))
+(d13d (d7d "Setters" ))
+(d21d (d2d a5a ))
+(d13d (d9d "Triggers" ))
+(d21d (d3d a7a ))
+(d22d (d10d "CustomStyle" a9a ))
+(d14d (d0d d0d a10a ))
+(d18d (d13d d0d d0d d3d ))
+(d20d (d12d "123" ))
+(d20d (d12d "456" ))
+(d14d (d13d d5d a12a ))
+(d19d (d0d a13a d2d ))
+(d14d (d15d d6d a14a ))
+(d19d (d0d a15a d2d ))
+(d6d (d16d d-1d ("Size.Width" zz a1a zz "{0:N0}" zz )))
+(d16d (d16d d0d d37d ))
+(d14d (d16d d7d a17a ))
+(d19d (d0d a16a d2d ))
+(d6d (d17d d-1d ))
+(d11d (a38a "300, 200" ))
+(d14d (d17d d8d a39a ))
+(d17d (d17d d1d "positionKey" ))
+(d19d (d0d a17a d2d ))
+(d6d (d16d d-1d ("Size.Height" zz a1a zz "{0:N0}" a17a )))
+(d16d (d18d d0d d40d ))
+(d19d (d0d a18a d2d ))
+(d9d (d1d zz "PositionProperty" ))
+(d14d (d19d d9d a41a ))
+(d19d (d0d a19a d2d ))
+(d18d (d21d d0d d0d d4d ))
+(d20d (d20d d123d ))
+(d20d (d20d h123h ))
+(d20d (d20d e123e ))
+(d20d (d20d e123e ))
+(d20d (d20d j123j ))
+(d20d (d20d k123k ))
+(d20d (d20d mFalsem ))
+(d20d (d20d l01:02:03l ))
+(d20d (d20d 'c' ))
+(d20d (d20d c1c ))
+(d20d (d20d c1c ))
+(d20d (d20d f1f ))
+(d20d (d20d b1b ))
+(d20d (d20d "http://www.samsung.net/" ))
+(d20d (d20d n123n ))
+(d19d (d0d a21a d2d ))
+(d15d (d23d d2d zz ))
+(d14d (d22d d10d "123" ))
+(d13d (d23d "CustomList" ))
+(d21d (d4d a22a ))
+(d13d (d23d "CustomList" ))
+(d21d (d5d "456" ))
+(d19d (d0d a23a d2d ))
+(d14d (d24d d10d "123" ))
+(d20d (d25d a24a ))
+(d20d (d25d "456" ))
+(d14d (d26d d11d a25a ))
+(d19d (d0d a26a d2d ))
+(d19d (d0d a28a d2d ))
+(d19d (d0d a30a d2d ))
+(d19d (d0d a31a d2d ))
+(d19d (d0d a32a d2d ))
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.BaseComponents.View"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+ <View.XamlResources>
+ <ResourceDictionary Source="res/layout/MyResourceDictionary.xaml" />
+ </View.XamlResources>
+ <View x:Name="view1" BackgroundColor="Red" SizeWidth="100" SizeHeight="100" l:FocusEffect.Focusable="true" />
+ <l:MyView >
+ <l:MyView.Margin>
+ <OnPlatform x:TypeArguments="Extents">
+ <On Platform="iOS" Value="0,20,0,0" />
+ <On Platform="Android" Value="5,10,0,0" />
+ <On Platform="UWP" Value="10,0,0,0" />
+ </OnPlatform>
+ </l:MyView.Margin>
+ <l:MyView.Array>
+ <x:Array Type="{x:Type x:String}">
+ <x:String>AA</x:String>
+ <x:String>BB</x:String>
+ </x:Array>
+ </l:MyView.Array>
+ </l:MyView>
+</View>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<Layer x:Class="Tizen.NUI.Layer"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="using:Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+ <View.XamlResources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <!-- Add more resource dictionaries here -->
+ <ResourceDictionary Source="res/layout/MyResourceDictionary.xaml"/>
+ <!-- Add more resource dictionaries here -->
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </View.XamlResources>
+ <View x:Name="view1" BackgroundColor="Red" SizeWidth="100" SizeHeight="100" Sensitive="true" />
+</Layer>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.Devel.Tests.BindingSample"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+ <View.XamlResources>
+ <ResourceDictionary>
+ <l:FloatToBoolConverter x:Key="floatToBool" />
+ <l:FloatToIntConverter x:Key="floatToInt" />
+ </ResourceDictionary>
+ </View.XamlResources>
+
+ <View x:Name="view1" BackgroundColor="Red" SizeWidth="100" SizeHeight="100" Sensitive="true" />
+ <TextLabel PositionX="200" PositionY="500" Ellipsis="{Binding Source={x:Reference view1}, Path=SizeWidth, Converter={StaticResource floatToBool}}" />
+ <TextLabel>
+ <TextLabel.Text>
+ <Binding Source="{x:Reference view1}" Path="Sensitive">
+ <Binding.Converter>
+ <l:BoolToObjectConverter x:TypeArguments="x:String" TrueObject="Of course!" FalseObject="No way!" />
+ </Binding.Converter>
+ </Binding>
+ </TextLabel.Text>
+ </TextLabel>
+ <TextLabel Text="{Binding Red, Converter={StaticResource floatToInt}, ConverterParameter=255, StringFormat='Red = {0:X2}'}" >
+ <TextLabel.BindingContext>
+ <l:RgbColorViewModel Color="Red" />
+ </TextLabel.BindingContext>
+ </TextLabel>
+</View>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<ResourceDictionary xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+ <DataTemplate x:Key="PersonDataTemplate">
+ <View BackgroundColor="Red" SizeWidth="100" SizeHeight="100" Sensitive="true" />
+ </DataTemplate>
+
+</ResourceDictionary>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<l:UIElement x:Class="Tizen.NUI.Devel.Tests.TotalSample"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+ <l:UIElement Event="UIElementEvent">
+ <x:Arguments>
+ <l:UIElement-TestEnum>V1</l:UIElement-TestEnum>
+ </x:Arguments>
+ <l:UIElement.StrList>
+ <x:List x:TypeArguments="x:String">
+ <x:String>123</x:String>
+ <x:String>456</x:String>
+ </x:List>
+ </l:UIElement.StrList>
+ </l:UIElement>
+
+ <l:UIElement Child ="{x:Static l:UIElement.StaticChild}" />
+
+ <l:UIElement.XamlResources>
+ <ResourceDictionary>
+ <l:FloatToStringConverter x:Key="floatToStringConverter" />
+ <x:String x:Key="positionKey">
+ 200, 200
+ </x:String>
+ <XamlStyle x:Key="CustomStyle" TargetType="ImageView">
+ <XamlStyle.Triggers>
+ <Trigger TargetType="ImageView" Property="ResourceUrl" Value="*Resource*/arrow.jpg">
+ <Trigger.Setters>
+ <Setter Property="PositionX" Value="200" />
+ </Trigger.Setters>
+ </Trigger>
+ <Trigger TargetType="ImageView" Property="ResourceUrl" Value="*Resource*/arrow.jpg">
+ <Trigger.Setters>
+ <Setter Property="PositionX" Value="500" />
+ </Trigger.Setters>
+ </Trigger>
+ </XamlStyle.Triggers>
+ </XamlStyle>
+ </ResourceDictionary>
+ </l:UIElement.XamlResources>
+
+ <l:UIElement x:Name="t1" CharP="c" StringP="{Binding Path=Size.Width, Converter={StaticResource floatToStringConverter}, StringFormat='{0:N0}'}" BindingContext="{x:Reference t2}" />
+ <l:UIElement x:Name="t2" Size="300, 200" Position="{DynamicResource positionKey}" />
+ <l:UIElement x:Name="t3" StringP="{Binding Source={x:Reference t2}, Path=Size.Height, Converter={StaticResource floatToStringConverter}, StringFormat='{0:N0}'}" />
+
+ <l:UIElement CustomBindableProperty="View.Position">
+ </l:UIElement>
+
+ <!--Cover CreateLanguagePrimitive-->
+ <l:UIElement Event="StaticUIElementEvent">
+ <x:Arguments>
+ <x:List x:TypeArguments="x:Object">
+ <x:Int32>123</x:Int32>
+ <x:UInt32>123</x:UInt32>
+ <x:Int64>123</x:Int64>
+ <x:UInt64>123</x:UInt64>
+ <x:Single>123</x:Single>
+ <x:Double>123</x:Double>
+ <x:Boolean>1</x:Boolean>
+ <x:TimeSpan>1:2:3</x:TimeSpan>
+ <x:Char>c</x:Char>
+ <x:Int16>1</x:Int16>
+ <x:UInt16>1</x:UInt16>
+ <x:Byte>1</x:Byte>
+ <x:SByte>1</x:SByte>
+ <x:Uri>http://www.samsung.net</x:Uri>
+ <x:Decimal>123</x:Decimal>
+ </x:List>
+ </x:Arguments>
+ </l:UIElement>
+
+ <l:UIElement>
+ <l:UIElement.Size>
+ <Null />
+ </l:UIElement.Size>
+ <l:UIElement.CustomList>
+ <ApplicationResourcePath FilePath="123" />
+ <x:String>456</x:String>
+ </l:UIElement.CustomList>
+ </l:UIElement>
+
+ <l:UIElement>
+ <l:UIElement.CustomList>
+ <l:CustomList>
+ <ApplicationResourcePath FilePath="123" />
+ <x:String>456</x:String>
+ </l:CustomList>
+ </l:UIElement.CustomList>
+ </l:UIElement>
+
+ <l:UIElement>
+ <x:Arguments>
+ <l:UIElement-TestNestType />
+ </x:Arguments>
+ </l:UIElement>
+
+ <l:UIElement>
+ <x:Arguments>
+ <l:UIElement />
+ </x:Arguments>
+ </l:UIElement>
+
+ <l:UIElement x:FactoryMethod="FactoryMethod">
+ <x:Arguments>
+ <x:Int32>1</x:Int32>
+ <x:String>str</x:String>
+ <x:Single>2.0</x:Single>
+ </x:Arguments>
+ </l:UIElement>
+
+ <l:UIElement x:FactoryMethod="FactoryMethodWithoutParams">
+ </l:UIElement>
+</l:UIElement>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.Devel.Tests.XamlStyleSample"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+ <View.XamlResources>
+ <ResourceDictionary>
+ <Color x:Key="redColor">Red</Color>
+ <XamlStyle x:Key="baseStyle" TargetType="View" ApplyToDerivedTypes="true">
+ <Setter Property="SizeWidth" Value="100" />
+ <Setter Property="SizeHeight" Value="10" />
+ <Setter Property="BackgroundColor" Value="{StaticResource redColor}" />
+ </XamlStyle>
+ <XamlStyle x:Key="imageViewStyle" TargetType="ImageView" BasedOn="{StaticResource baseStyle}">
+ <XamlStyle.Triggers>
+ <Trigger TargetType="ImageView" Property="ResourceUrl" Value="*Resource*/arrow.jpg">
+ <Trigger.Setters>
+ <Setter Property="PositionX" Value="200" />
+ </Trigger.Setters>
+ </Trigger>
+ <Trigger TargetType="ImageView" Property="ResourceUrl" Value="*Resource*/button_9patch.png">
+ <Trigger.Setters>
+ <Setter Property="PositionX" Value="500" />
+ </Trigger.Setters>
+ </Trigger>
+ </XamlStyle.Triggers>
+ </XamlStyle>
+ </ResourceDictionary>
+ </View.XamlResources>
+
+ <View BackgroundColor="Green" XamlStyle="{StaticResource baseStyle}" />
+ <ImageView ResourceUrl="*Resource*/picture.png" XamlStyle="{DynamicResource imageViewStyle}" PositionX="200" PositionY="500" />
+ <View>
+ <View.BindingContext>
+ <l:NameViewModel x:Name="nameViewModel"/>
+ </View.BindingContext>
+ <TextLabel Text="UserName" Size2D="300,50" Position2D="500,200" BackgroundColor="White"/>
+ <TextLabel Text="{Binding UserName}" Size2D="300,50" Position2D="500,270" BackgroundColor="Blue"/>
+ <TextLabel Text="CompanyName" Size2D="300,50" Position2D="500,340" BackgroundColor="Yellow"/>
+ <TextLabel Text="{Binding CompanyName}" Size2D="300,50" Position2D="500,410" BackgroundColor="Green"/>
+ <l:UIElement x:Name="button" Size2D="200,100" Position2D="500,480" Command="{Binding UpdateName}"/>
+ </View>
+</View>
public void Button_INIT_WITH_STRING_Exception()
{
/* TEST CODE */
- try
- {
- var button = new Button("defaultButtonX");
- Assert.Fail("Should throw the Exception: There is no style of defaultButtonX !");
- }
- catch (InvalidOperationException e)
- {
- Assert.Pass("InvalidOperationException: passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => new Button("defaultButtonX"));
}
#if (EXAMPLE)
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("AddEventAction AddEventAction.")]
- [Property("SPEC", "Tizen.NUI.EXaml.AddEventAction.AddEventAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlAddEventActionConstructor()
- {
- tlog.Debug(tag, $"EXamlAddEventActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("AddEventAction AddEventAction.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.AddEventAction.AddEventAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlAddEventActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlAddEventActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.AddEventAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object AddEventAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.AddEventAction>(testingTarget, "Should be an instance of AddEventAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.AddEventAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object AddEventAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.AddEventAction>(testingTarget, "Should be an instance of AddEventAction type.");
- tlog.Debug(tag, $"EXamlAddEventActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlAddEventActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("AddEventAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.AddEventAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlAddEventActionInit()
- {
- tlog.Debug(tag, $"EXamlAddEventActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("AddEventAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.AddEventAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlAddEventActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlAddEventActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.AddEventAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object AddEventAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.AddEventAction>(testingTarget, "Should be an instance of AddEventAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.AddEventAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object AddEventAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.AddEventAction>(testingTarget, "Should be an instance of AddEventAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlAddEventActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlAddEventActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("AddExistInstanceAction AddExistInstanceAction.")]
- [Property("SPEC", "Tizen.NUI.EXaml.AddExistInstanceAction.AddExistInstanceAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlAddExistInstanceActionConstructor()
- {
- tlog.Debug(tag, $"EXamlAddExistInstanceActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("AddExistInstanceAction AddExistInstanceAction.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.AddExistInstanceAction.AddExistInstanceAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlAddExistInstanceActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlAddExistInstanceActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.AddExistInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object AddExistInstanceAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.AddExistInstanceAction>(testingTarget, "Should be an instance of AddExistInstanceAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.AddExistInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object AddExistInstanceAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.AddExistInstanceAction>(testingTarget, "Should be an instance of AddExistInstanceAction type.");
- tlog.Debug(tag, $"EXamlAddExistInstanceActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlAddExistInstanceActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("AddExistInstanceAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.AddExistInstanceAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlAddExistInstanceActionInit()
- {
- tlog.Debug(tag, $"EXamlAddExistInstanceActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("AddExistInstanceAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.AddExistInstanceAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlAddExistInstanceActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlAddExistInstanceActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.AddExistInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object AddExistInstanceAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.AddExistInstanceAction>(testingTarget, "Should be an instance of AddExistInstanceAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.AddExistInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object AddExistInstanceAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.AddExistInstanceAction>(testingTarget, "Should be an instance of AddExistInstanceAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlAddExistInstanceActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlAddExistInstanceActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("AddToCollectionPropertyAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.AddToCollectionPropertyAction.AddToCollectionPropertyAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlAddToCollectionPropertyActionConstructor()
- {
- tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("AddToCollectionPropertyAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.AddToCollectionPropertyAction.AddToCollectionPropertyAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlAddToCollectionPropertyActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.AddToCollectionPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object AddToCollectionPropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.AddToCollectionPropertyAction>(testingTarget, "Should be an instance of AddToCollectionPropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.AddToCollectionPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object AddToCollectionPropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.AddToCollectionPropertyAction>(testingTarget, "Should be an instance of AddToCollectionPropertyAction type.");
- tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("AddToCollectionPropertyAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.AddToCollectionPropertyAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlAddToCollectionPropertyActionInit()
- {
- tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("AddToCollectionPropertyAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.AddToCollectionPropertyAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlAddToCollectionPropertyActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.AddToCollectionPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object AddToCollectionPropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.AddToCollectionPropertyAction>(testingTarget, "Should be an instance of AddToCollectionPropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.AddToCollectionPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object AddToCollectionPropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.AddToCollectionPropertyAction>(testingTarget, "Should be an instance of AddToCollectionPropertyAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlAddToCollectionPropertyActionInit END (OK)");
+ //}
}
}
-using global::System;
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using Tizen.NUI.Components;
-using Tizen.NUI.BaseComponents;
+// using global::System;
+// using NUnit.Framework;
+// using NUnit.Framework.TUnit;
+// using Tizen.NUI.Components;
+// using Tizen.NUI.BaseComponents;
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
+// namespace Tizen.NUI.Devel.Tests
+// {
+// using tlog = Tizen.Log;
- [TestFixture]
- [Description("internal/EXaml/Action/AddToResourceDictionary")]
- public class InternalAddToResourceDictionaryTest
- {
- private const string tag = "NUITEST";
+// [TestFixture]
+// [Description("internal/EXaml/Action/AddToResourceDictionary")]
+// public class InternalAddToResourceDictionaryTest
+// {
+// private const string tag = "NUITEST";
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
+// [SetUp]
+// public void Init()
+// {
+// tlog.Info(tag, "Init() is called!");
+// }
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
+// [TearDown]
+// public void Destroy()
+// {
+// tlog.Info(tag, "Destroy() is called!");
+// }
- [Test]
- [Category("P1")]
- [Description("AddToResourceDictionary constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.AddToResourceDictionary.AddToResourceDictionary C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlAddToResourceDictionaryConstructor()
- {
- tlog.Debug(tag, $"EXamlAddToResourceDictionaryConstructor START");
+// [Test]
+// [Category("P1")]
+// [Description("AddToResourceDictionary constructor.")]
+// [Property("SPEC", "Tizen.NUI.EXaml.AddToResourceDictionary.AddToResourceDictionary C")]
+// [Property("SPEC_URL", "-")]
+// [Property("CRITERIA", "CONSTR")]
+// [Property("AUTHOR", "guowei.wang@samsung.com")]
+// public void EXamlAddToResourceDictionaryConstructor()
+// {
+// tlog.Debug(tag, $"EXamlAddToResourceDictionaryConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.AddToResourceDictionary(new Tizen.NUI.EXaml.GlobalDataList(), 1, "dictionary", null);
- Assert.IsNotNull(testingTarget, "Can't create success object AddToResourceDictionary");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.AddToResourceDictionary>(testingTarget, "Should be an instance of AddToResourceDictionary type.");
+// var testingTarget = new Tizen.NUI.EXaml.AddToResourceDictionary(new Tizen.NUI.EXaml.GlobalDataList(), new List<object>(){1, "dictionary", null});
+// Assert.IsNotNull(testingTarget, "Can't create success object AddToResourceDictionary");
+// Assert.IsInstanceOf<Tizen.NUI.EXaml.AddToResourceDictionary>(testingTarget, "Should be an instance of AddToResourceDictionary type.");
- tlog.Debug(tag, $"EXamlAddToResourceDictionaryConstructor END (OK)");
- }
- }
-}
+// tlog.Debug(tag, $"EXamlAddToResourceDictionaryConstructor END (OK)");
+// }
+// }
+// }
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("CallAddMethodAction construtor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.CallAddMethodAction.CallAddMethodAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlCallAddMethodActionConstructor()
- {
- tlog.Debug(tag, $"EXamlCallAddMethodActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("CallAddMethodAction construtor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.CallAddMethodAction.CallAddMethodAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlCallAddMethodActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlCallAddMethodActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.CallAddMethodAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object CallAddMethodAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.CallAddMethodAction>(testingTarget, "Should be an instance of CallAddMethodAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.CallAddMethodAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object CallAddMethodAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.CallAddMethodAction>(testingTarget, "Should be an instance of CallAddMethodAction type.");
- tlog.Debug(tag, $"EXamlCallAddMethodActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlCallAddMethodActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("CallAddMethodAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.CallAddMethodAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlCallAddMethodActionInit()
- {
- tlog.Debug(tag, $"EXamlCallAddMethodActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("CallAddMethodAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.CallAddMethodAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlCallAddMethodActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlCallAddMethodActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.CallAddMethodAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object CallAddMethodAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.CallAddMethodAction>(testingTarget, "Should be an instance of CallAddMethodAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.CallAddMethodAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object CallAddMethodAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.CallAddMethodAction>(testingTarget, "Should be an instance of CallAddMethodAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlCallAddMethodActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlCallAddMethodActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("CreateInstanceAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.CreateInstanceAction.CreateInstanceAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlCreateInstanceActionConstructor()
- {
- tlog.Debug(tag, $"EXamlCreateInstanceActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("CreateInstanceAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.CreateInstanceAction.CreateInstanceAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlCreateInstanceActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlCreateInstanceActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.CreateInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object CreateInstanceAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.CreateInstanceAction>(testingTarget, "Should be an instance of CreateInstanceAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.CreateInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object CreateInstanceAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.CreateInstanceAction>(testingTarget, "Should be an instance of CreateInstanceAction type.");
- tlog.Debug(tag, $"EXamlCreateInstanceActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlCreateInstanceActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("CreateInstanceAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.CreateInstanceAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlCreateInstanceActionInit()
- {
- tlog.Debug(tag, $"EXamlCreateInstanceActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("CreateInstanceAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.CreateInstanceAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlCreateInstanceActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlCreateInstanceActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.CreateInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object CreateInstanceAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.CreateInstanceAction>(testingTarget, "Should be an instance of CreateInstanceAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.CreateInstanceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object CreateInstanceAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.CreateInstanceAction>(testingTarget, "Should be an instance of CreateInstanceAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlCreateInstanceActionnit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlCreateInstanceActionnit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("GetObjectByPropertyAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GetObjectByPropertyAction.GetObjectByPropertyAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGetObjectByPropertyActionConstructor()
- {
- tlog.Debug(tag, $"EXamlGetObjectByPropertyActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GetObjectByPropertyAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GetObjectByPropertyAction.GetObjectByPropertyAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGetObjectByPropertyActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlGetObjectByPropertyActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.GetObjectByPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GetObjectByPropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GetObjectByPropertyAction>(testingTarget, "Should be an instance of GetObjectByPropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GetObjectByPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GetObjectByPropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GetObjectByPropertyAction>(testingTarget, "Should be an instance of GetObjectByPropertyAction type.");
- tlog.Debug(tag, $"EXamlGetObjectByPropertyActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGetObjectByPropertyActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("GetObjectByPropertyAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GetObjectByPropertyAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGetObjectByPropertyActionInit()
- {
- tlog.Debug(tag, $"EXamlGetObjectByPropertyActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GetObjectByPropertyAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GetObjectByPropertyAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGetObjectByPropertyActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlGetObjectByPropertyActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.GetObjectByPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GetObjectByPropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GetObjectByPropertyAction>(testingTarget, "Should be an instance of GetObjectByPropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GetObjectByPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GetObjectByPropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GetObjectByPropertyAction>(testingTarget, "Should be an instance of GetObjectByPropertyAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlGetObjectByPropertyActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGetObjectByPropertyActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("RegisterXNameAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.RegisterXNameAction.RegisterXNameAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlRegisterXNameActionConstructor()
- {
- tlog.Debug(tag, $"EXamlRegisterXNameActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("RegisterXNameAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.RegisterXNameAction.RegisterXNameAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlRegisterXNameActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlRegisterXNameActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.RegisterXNameAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object RegisterXNameAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.RegisterXNameAction>(testingTarget, "Should be an instance of RegisterXNameAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.RegisterXNameAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object RegisterXNameAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.RegisterXNameAction>(testingTarget, "Should be an instance of RegisterXNameAction type.");
- tlog.Debug(tag, $"EXamlRegisterXNameActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlRegisterXNameActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("RegisterXNameAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.RegisterXNameAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlRegisterXNameActionInit()
- {
- tlog.Debug(tag, $"EXamlRegisterXNameActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("RegisterXNameAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.RegisterXNameAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlRegisterXNameActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlRegisterXNameActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.RegisterXNameAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object RegisterXNameAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.RegisterXNameAction>(testingTarget, "Should be an instance of RegisterXNameAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.RegisterXNameAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object RegisterXNameAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.RegisterXNameAction>(testingTarget, "Should be an instance of RegisterXNameAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlRegisterXNameActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlRegisterXNameActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("SetBindalbePropertyAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetBindalbePropertyAction.SetBindalbePropertyAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetBindalbePropertyActionConstructor()
- {
- tlog.Debug(tag, $"EXamlSetBindalbePropertyActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetBindalbePropertyAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetBindalbePropertyAction.SetBindalbePropertyAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetBindalbePropertyActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlSetBindalbePropertyActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.SetBindalbePropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetBindalbePropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindalbePropertyAction>(testingTarget, "Should be an instance of SetBindalbePropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetBindalbePropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetBindalbePropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindalbePropertyAction>(testingTarget, "Should be an instance of SetBindalbePropertyAction type.");
- tlog.Debug(tag, $"EXamlSetBindalbePropertyActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetBindalbePropertyActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("SetBindalbePropertyAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetBindalbePropertyAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetBindalbePropertyActionInit()
- {
- tlog.Debug(tag, $"EXamlSetBindalbePropertyActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetBindalbePropertyAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetBindalbePropertyAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetBindalbePropertyActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlSetBindalbePropertyActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.SetBindalbePropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetBindalbePropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindalbePropertyAction>(testingTarget, "Should be an instance of SetBindalbePropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetBindalbePropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetBindalbePropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindalbePropertyAction>(testingTarget, "Should be an instance of SetBindalbePropertyAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlSetBindalbePropertyActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetBindalbePropertyActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("SetBindingAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetBindingAction.SetBindingAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetBindingActionConstructor()
- {
- tlog.Debug(tag, $"EXamlSetBindingActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetBindingAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetBindingAction.SetBindingAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetBindingActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlSetBindingActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.SetBindingAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetBindingAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindingAction>(testingTarget, "Should be an instance of SetBindingAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetBindingAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetBindingAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindingAction>(testingTarget, "Should be an instance of SetBindingAction type.");
- tlog.Debug(tag, $"EXamlSetBindingActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetBindingActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("SetBindingAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetBindingAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetBindingActionInit()
- {
- tlog.Debug(tag, $"EXamlSetBindingActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetBindingAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetBindingAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetBindingActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlSetBindingActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.SetBindingAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetBindingAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindingAction>(testingTarget, "Should be an instance of SetBindingAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetBindingAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetBindingAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetBindingAction>(testingTarget, "Should be an instance of SetBindingAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlSetBindingActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetBindingActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("SetDynamicResourceAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetDynamicResourceAction.SetDynamicResourceAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetDynamicResourceActionConstructor()
- {
- tlog.Debug(tag, $"EXamlSetDynamicResourceActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetDynamicResourceAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetDynamicResourceAction.SetDynamicResourceAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetDynamicResourceActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlSetDynamicResourceActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.SetDynamicResourceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetDynamicResourceAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetDynamicResourceAction>(testingTarget, "Should be an instance of SetDynamicResourceAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetDynamicResourceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetDynamicResourceAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetDynamicResourceAction>(testingTarget, "Should be an instance of SetDynamicResourceAction type.");
- tlog.Debug(tag, $"EXamlSetDynamicResourceActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetDynamicResourceActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("SetDynamicResourceAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetDynamicResourceAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetDynamicResourceActionInit()
- {
- tlog.Debug(tag, $"EXamlSetDynamicResourceActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetDynamicResourceAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetDynamicResourceAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetDynamicResourceActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlSetDynamicResourceActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.SetDynamicResourceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetDynamicResourceAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetDynamicResourceAction>(testingTarget, "Should be an instance of SetDynamicResourceAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetDynamicResourceAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetDynamicResourceAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetDynamicResourceAction>(testingTarget, "Should be an instance of SetDynamicResourceAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlSetDynamicResourceActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetDynamicResourceActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("SetPropertyAction constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetPropertyAction.SetPropertyAction C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetPropertyActionConstructor()
- {
- tlog.Debug(tag, $"EXamlSetPropertyActionConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetPropertyAction constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetPropertyAction.SetPropertyAction C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetPropertyActionConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlSetPropertyActionConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.SetPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetPropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetPropertyAction>(testingTarget, "Should be an instance of SetPropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetPropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetPropertyAction>(testingTarget, "Should be an instance of SetPropertyAction type.");
- tlog.Debug(tag, $"EXamlSetPropertyActionConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetPropertyActionConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("SetPropertyAction Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.SetPropertyAction.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlSetPropertyActionInit()
- {
- tlog.Debug(tag, $"EXamlSetPropertyActionInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("SetPropertyAction Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.SetPropertyAction.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlSetPropertyActionInit()
+ //{
+ // tlog.Debug(tag, $"EXamlSetPropertyActionInit START");
- var testingTarget = new Tizen.NUI.EXaml.SetPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object SetPropertyAction");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.SetPropertyAction>(testingTarget, "Should be an instance of SetPropertyAction type.");
+ // var testingTarget = new Tizen.NUI.EXaml.SetPropertyAction(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object SetPropertyAction");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.SetPropertyAction>(testingTarget, "Should be an instance of SetPropertyAction type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlSetPropertyActionInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlSetPropertyActionInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("GatherBindablePropertiesBlock constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherBindablePropertiesBlock.GatherBindablePropertiesBlock C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherBindablePropertiesBlockConstructor()
- {
- tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherBindablePropertiesBlock constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherBindablePropertiesBlock.GatherBindablePropertiesBlock C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherBindablePropertiesBlockConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.GatherBindablePropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherBindablePropertiesBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherBindablePropertiesBlock>(testingTarget, "Should be an instance of GatherBindablePropertiesBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherBindablePropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherBindablePropertiesBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherBindablePropertiesBlock>(testingTarget, "Should be an instance of GatherBindablePropertiesBlock type.");
- tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("GatherBindablePropertiesBlock Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherBindablePropertiesBlock.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherBindablePropertiesBlockInit()
- {
- tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherBindablePropertiesBlock Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherBindablePropertiesBlock.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherBindablePropertiesBlockInit()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockInit START");
- var testingTarget = new Tizen.NUI.EXaml.GatherBindablePropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherBindablePropertiesBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherBindablePropertiesBlock>(testingTarget, "Should be an instance of GatherBindablePropertiesBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherBindablePropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherBindablePropertiesBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherBindablePropertiesBlock>(testingTarget, "Should be an instance of GatherBindablePropertiesBlock type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherBindablePropertiesBlockInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("GatherEventsBlock constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherEventsBlock.GatherEventsBlock C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherEventsBlockConstructor()
- {
- tlog.Debug(tag, $"EXamlGatherEventsBlockConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherEventsBlock constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherEventsBlock.GatherEventsBlock C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherEventsBlockConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherEventsBlockConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.GatherEventsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherEventsBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherEventsBlock>(testingTarget, "Should be an instance of GatherEventsBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherEventsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherEventsBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherEventsBlock>(testingTarget, "Should be an instance of GatherEventsBlock type.");
- tlog.Debug(tag, $"EXamlGatherEventsBlockConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherEventsBlockConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("GatherEventsBlock Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherEventsBlock.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherEventsBlockInit()
- {
- tlog.Debug(tag, $"EXamlGatherEventsBlockInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherEventsBlock Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherEventsBlock.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherEventsBlockInit()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherEventsBlockInit START");
- var testingTarget = new Tizen.NUI.EXaml.GatherEventsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherEventsBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherEventsBlock>(testingTarget, "Should be an instance of GatherEventsBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherEventsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherEventsBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherEventsBlock>(testingTarget, "Should be an instance of GatherEventsBlock type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlGatherEventsBlockInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherEventsBlockInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("GatherMethodsBlock constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherMethodsBlock.GatherMethodsBlock C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherMethodsBlockConstructor()
- {
- tlog.Debug(tag, $"EXamlGatherMethodsBlockConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherMethodsBlock constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherMethodsBlock.GatherMethodsBlock C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherMethodsBlockConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherMethodsBlockConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.GatherMethodsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherMethodsBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherMethodsBlock>(testingTarget, "Should be an instance of GatherMethodsBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherMethodsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherMethodsBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherMethodsBlock>(testingTarget, "Should be an instance of GatherMethodsBlock type.");
- tlog.Debug(tag, $"EXamlGatherMethodsBlockConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherMethodsBlockConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("GatherMethodsBlock Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherMethodsBlock.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherMethodsBlockInit()
- {
- tlog.Debug(tag, $"EXamlGatherMethodsBlockInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherMethodsBlock Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherMethodsBlock.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherMethodsBlockInit()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherMethodsBlockInit START");
- var testingTarget = new Tizen.NUI.EXaml.GatherMethodsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherMethodsBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherMethodsBlock>(testingTarget, "Should be an instance of GatherMethodsBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherMethodsBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherMethodsBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherMethodsBlock>(testingTarget, "Should be an instance of GatherMethodsBlock type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlGatherMethodsBlockInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherMethodsBlockInit END (OK)");
+ //}
}
}
tlog.Info(tag, "Destroy() is called!");
}
- [Test]
- [Category("P1")]
- [Description("GatherPropertiesBlock constructor.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherPropertiesBlock.GatherPropertiesBlock C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherPropertiesBlockConstructor()
- {
- tlog.Debug(tag, $"EXamlGatherPropertiesBlockConstructor START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherPropertiesBlock constructor.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherPropertiesBlock.GatherPropertiesBlock C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherPropertiesBlockConstructor()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherPropertiesBlockConstructor START");
- var testingTarget = new Tizen.NUI.EXaml.GatherPropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherPropertiesBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherPropertiesBlock>(testingTarget, "Should be an instance of GatherPropertiesBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherPropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherPropertiesBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherPropertiesBlock>(testingTarget, "Should be an instance of GatherPropertiesBlock type.");
- tlog.Debug(tag, $"EXamlGatherPropertiesBlockConstructor END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherPropertiesBlockConstructor END (OK)");
+ //}
- [Test]
- [Category("P1")]
- [Description("GatherPropertiesBlock Init.")]
- [Property("SPEC", "Tizen.NUI.EXaml.GatherPropertiesBlock.Init M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlGatherPropertiesBlockInit()
- {
- tlog.Debug(tag, $"EXamlGatherPropertiesBlockInit START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("GatherPropertiesBlock Init.")]
+ //[Property("SPEC", "Tizen.NUI.EXaml.GatherPropertiesBlock.Init M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void EXamlGatherPropertiesBlockInit()
+ //{
+ // tlog.Debug(tag, $"EXamlGatherPropertiesBlockInit START");
- var testingTarget = new Tizen.NUI.EXaml.GatherPropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
- Assert.IsNotNull(testingTarget, "Can't create success object GatherPropertiesBlock");
- Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherPropertiesBlock>(testingTarget, "Should be an instance of GatherPropertiesBlock type.");
+ // var testingTarget = new Tizen.NUI.EXaml.GatherPropertiesBlock(new Tizen.NUI.EXaml.GlobalDataList(), null);
+ // Assert.IsNotNull(testingTarget, "Can't create success object GatherPropertiesBlock");
+ // Assert.IsInstanceOf<Tizen.NUI.EXaml.GatherPropertiesBlock>(testingTarget, "Should be an instance of GatherPropertiesBlock type.");
- try
- {
- testingTarget.Init();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+ // try
+ // {
+ // testingTarget.Init();
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
- tlog.Debug(tag, $"EXamlGatherPropertiesBlockInit END (OK)");
- }
+ // tlog.Debug(tag, $"EXamlGatherPropertiesBlockInit END (OK)");
+ //}
}
}
-using global::System;
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using Tizen.NUI.Components;
-using Tizen.NUI.BaseComponents;
+// using global::System;
+// using NUnit.Framework;
+// using NUnit.Framework.TUnit;
+// using Tizen.NUI.Components;
+// using Tizen.NUI.BaseComponents;
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
+// namespace Tizen.NUI.Devel.Tests
+// {
+// using tlog = Tizen.Log;
- [TestFixture]
- [Description("Internal/EXaml/LoadEXaml")]
- public class InternalLoadEXamlTest
- {
- private const string tag = "NUITEST";
- private string eXamlString = "<?xml?><?xml-stylesheet?>";
+// [TestFixture]
+// [Description("Internal/EXaml/LoadEXaml")]
+// public class InternalLoadEXamlTest
+// {
+// private const string tag = "NUITEST";
+// private string eXamlString = "<?xml?><?xml-stylesheet?>";
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
+// [SetUp]
+// public void Init()
+// {
+// tlog.Info(tag, "Init() is called!");
+// }
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
+// [TearDown]
+// public void Destroy()
+// {
+// tlog.Info(tag, "Destroy() is called!");
+// }
- [Test]
- [Category("P1")]
- [Description("LoadEXaml GatherDataList.")]
- [Property("SPEC", "Tizen.NUI.LoadEXaml.GatherDataList M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void LoadEXamlGatherDataList()
- {
- tlog.Debug(tag, $"LoadEXamlGatherDataList START");
+// [Test]
+// [Category("P1")]
+// [Description("LoadEXaml GatherDataList.")]
+// [Property("SPEC", "Tizen.NUI.LoadEXaml.GatherDataList M")]
+// [Property("SPEC_URL", "-")]
+// [Property("CRITERIA", "MR")]
+// [Property("AUTHOR", "guowei.wang@samsung.com")]
+// public void LoadEXamlGatherDataList()
+// {
+// tlog.Debug(tag, $"LoadEXamlGatherDataList START");
- try
- {
- Tizen.NUI.EXaml.LoadEXaml.GatherDataList(eXamlString);
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
- }
+// try
+// {
+// Tizen.NUI.EXaml.LoadEXaml.GatherDataList(eXamlString);
+// }
+// catch (Exception e)
+// {
+// tlog.Debug(tag, e.Message.ToString());
+// Assert.Fail("Caught Exception : Failed!");
+// }
- tlog.Debug(tag, $"LoadEXamlGatherDataList END (OK)");
- }
- }
-}
+// tlog.Debug(tag, $"LoadEXamlGatherDataList END (OK)");
+// }
+// }
+// }
visitor = null;
tlog.Info(tag, "Destroy() is called!");
}
+ [Test]
+ [Category("P1")]
+ [Description("ApplyPropertiesVisitor ApplyPropertiesVisitor")]
+ [Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.ApplyPropertiesVisitor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void ApplyPropertiesVisitorConstructor()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorConstructor START");
+ HydrationContext context = new HydrationContext();
+ Assert.IsNotNull(context, "null HydrationContext");
+
+ ApplyPropertiesVisitor applyPropertiesVisitor = new ApplyPropertiesVisitor(context, false);
+ Assert.IsNotNull(applyPropertiesVisitor, "null ApplyPropertiesVisitor");
+ Assert.IsInstanceOf<ApplyPropertiesVisitor>(applyPropertiesVisitor, "Should return ApplyPropertiesVisitor instance.");
+
+ tlog.Debug(tag, $"ApplyPropertiesVisitorConstructor END");
+ }
+
[Test]
[Category("P1")]
[Description("ApplyPropertiesVisitor VisitingMode")]
tlog.Debug(tag, $"ApplyPropertiesVisitorSkipChildren END");
}
+
+ public class IXmlNamespaceResolverImplement : IXmlNamespaceResolver
+ {
+ public IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupNamespace(string prefix)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupPrefix(string namespaceName)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ApplyPropertiesVisitor IsResourceDictionary")]
+ [Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.IsResourceDictionary M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ApplyPropertiesVisitorIsResourceDictionary()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorIsResourceDictionary START");
+
+ try
+ {
+ HydrationContext context = new HydrationContext();
+ IList<XmlType> list = new List<XmlType>();
+ XmlType xmlType = new XmlType("myNameSpace", "myName", list);
+ Assert.IsNotNull(xmlType, "null XmlType");
+ IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement();
+ Assert.IsNotNull(i1, "null IXmlNamespaceResolverImplement");
+ ElementNode n1 = new ElementNode(xmlType, "myNameSpace", i1);
+ Assert.IsNotNull(n1, "null ElementNode");
+ context.Types[n1] = typeof(ResourceDictionary);
+ ApplyPropertiesVisitor a2 = new ApplyPropertiesVisitor(context, false);
+ Assert.IsNotNull(a2, "null ApplyPropertiesVisitor");
+ bool b1 = a2.IsResourceDictionary(n1);
+ Assert.True(b1, "Should be true");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ApplyPropertiesVisitorIsResourceDictionary END");
+
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ApplyPropertiesVisitor Visit")]
+ [Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.Visit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ApplyPropertiesVisitorVisit1()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorVisit1 START");
+
+ try
+ {
+ HydrationContext context = new HydrationContext();
+ object o1 = new object();
+ IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement();
+ Assert.IsNotNull(i1, "null IXmlNamespaceResolverImplement");
+ ValueNode valueNode = new ValueNode(o1, i1);
+ Assert.IsNotNull(valueNode, "null ValueNode");
+
+ INodeImpl nodeImplement = new INodeImpl();
+ Assert.IsNotNull(nodeImplement, "null INodeImplement");
+ context.Values[valueNode] = o1;
+ context.Values[nodeImplement] = o1;
+ ApplyPropertiesVisitor a2 = new ApplyPropertiesVisitor(context, false);
+ Assert.IsNotNull(a2, "null ApplyPropertiesVisitor");
+ a2.Visit(valueNode, nodeImplement);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ApplyPropertiesVisitorVisit1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ApplyPropertiesVisitor Visit")]
+ [Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.Visit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ApplyPropertiesVisitorVisit2()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorVisit2 START");
+
+ try
+ {
+ HydrationContext context = new HydrationContext();
+ object o1 = new object();
+ INodeImpl nodeImplement = new INodeImpl();
+ Assert.IsNotNull(nodeImplement, "null INodeImplement");
+
+ IList<XmlType> list = null;
+ XmlType xmlType = new XmlType("myNameSpace", "myName", list);
+ Assert.IsNotNull(xmlType, "null XmlType");
+ IXmlNamespaceResolverImplement ix1 = new IXmlNamespaceResolverImplement();
+ Assert.IsNotNull(ix1, "null IXmlNamespaceResolverImplement");
+ ElementNode n1 = new ElementNode(xmlType, "myNameSpace", ix1);
+ Assert.IsNotNull(n1, "null ElementNode");
+ context.Values[n1] = o1;
+ context.Values[nodeImplement] = o1;
+ ApplyPropertiesVisitor a2 = new ApplyPropertiesVisitor(context, false);
+ Assert.IsNotNull(a2, "null ApplyPropertiesVisitor");
+ a2.Visit(n1, nodeImplement);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ApplyPropertiesVisitorVisit2 END");
+
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ApplyPropertiesVisitor TryGetPropertyName")]
+ [Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.TryGetPropertyName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ApplyPropertiesVisitorTryGetPropertyName()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorTryGetPropertyName START");
+
+ try
+ {
+ INodeImpl n1 = new INodeImpl();
+ Assert.IsNotNull(n1, "null INodeImplement");
+ INodeImpl n2 = new INodeImpl();
+ Assert.IsNotNull(n2, "null INodeImplement");
+ XmlName xmlName = new XmlName();
+ Assert.IsNotNull(xmlName, "null XmlName");
+ ApplyPropertiesVisitor.TryGetPropertyName(n1, n2, out xmlName);
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ApplyPropertiesVisitorTryGetPropertyName END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ApplyPropertiesVisitor IsCollectionItem")]
+ [Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.IsCollectionItem M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ApplyPropertiesVisitorIsCollectionItem()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorIsCollectionItem START");
+
+ try
+ {
+ INodeImpl n1 = new INodeImpl();
+ Assert.IsNotNull(n1, "null INodeImplement");
+ INodeImpl n2 = new INodeImpl();
+ Assert.IsNotNull(n2, "null INodeImplement");
+
+ ApplyPropertiesVisitor.IsCollectionItem(n1, n2);
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ApplyPropertiesVisitorIsCollectionItem END");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ApplyPropertiesVisitor GetContentPropertyName")]
+ //[Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.GetContentPropertyName M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void ApplyPropertiesVisitorGetContentPropertyName()
+ //{
+ // tlog.Debug(tag, $"ApplyPropertiesVisitorGetContentPropertyName START");
+
+ // try
+ // {
+ // System.Reflection.TypeInfo typeInfo = new System.Reflection.TypeInfo();
+ // ApplyPropertiesVisitor.GetContentPropertyName(typeInfo);
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+
+ // tlog.Debug(tag, $"ApplyPropertiesVisitorGetContentPropertyName END");
+ // Assert.Pass("ApplyPropertiesVisitorGetContentPropertyName");
+ //}
+
+ public class IXmlLineInfoImplement : IXmlLineInfo
+ {
+ public int LineNumber => throw new NotImplementedException();
+
+ public int LinePosition => throw new NotImplementedException();
+
+ public bool HasLineInfo()
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ApplyPropertiesVisitor SetPropertyValue")]
+ //[Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.SetPropertyValue M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void ApplyPropertiesVisitorSetPropertyValue()
+ //{
+ // tlog.Debug(tag, $"ApplyPropertiesVisitorSetPropertyValue START");
+
+ // try
+ // {
+ // object o1 = new object();
+ // XmlName xmlName = new XmlName();
+ // Assert.IsNotNull(xmlName, "null XmlName");
+ // object value = new object();
+ // object rootElement = new object();
+ // INodeImplement nodeImplement = new INodeImplement();
+ // Assert.IsNotNull(nodeImplement, "null INodeImplement");
+ // HydrationContext context = new HydrationContext();
+ // Assert.IsNotNull(context, "null HydrationContext");
+ // IXmlLineInfoImplement xmlLineInfoImplement = new IXmlLineInfoImplement();
+ // Assert.IsNotNull(xmlLineInfoImplement, "null IXmlLineInfoImplement");
+
+ // ApplyPropertiesVisitor.SetPropertyValue(o1, xmlName, value, rootElement, nodeImplement, context, xmlLineInfoImplement);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"ApplyPropertiesVisitorSetPropertyValue END");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ApplyPropertiesVisitor GetPropertyValue")]
+ //[Property("SPEC", "Tizen.NUI.ApplyPropertiesVisitor.GetPropertyValue M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void ApplyPropertiesVisitorGetPropertyValue()
+ //{
+ // tlog.Debug(tag, $"ApplyPropertiesVisitorGetPropertyValue START");
+
+ // try
+ // {
+ // object o1 = new object();
+ // XmlName xmlName = new XmlName();
+ // Assert.IsNotNull(xmlName, "null XmlName");
+ // object value = new object();
+ // INodeImplement nodeImplement = new INodeImplement();
+ // Assert.IsNotNull(nodeImplement, "null INodeImplement");
+ // HydrationContext context = new HydrationContext();
+ // Assert.IsNotNull(context, "null HydrationContext");
+ // IXmlLineInfoImplement xmlLineInfoImplement = new IXmlLineInfoImplement();
+ // Assert.IsNotNull(xmlLineInfoImplement, "null IXmlLineInfoImplement");
+ // ApplyPropertiesVisitor.GetPropertyValue(o1, xmlName, context, xmlLineInfoImplement, out value);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"ApplyPropertiesVisitorGetPropertyValue END");
+ //}
}
}
\ No newline at end of file
[Test]
[Category("P1")]
+ [Description("CreateValuesVisitor CreateValuesVisitor")]
+ [Property("SPEC", "Tizen.NUI.CreateValuesVisitor.CreateValuesVisitor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void CreateValuesVisitorConstructor()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorConstructor START");
+
+ HydrationContext context = new HydrationContext();
+ Assert.IsNotNull(context, "null HydrationContext");
+ CreateValuesVisitor createValuesVisitor = new CreateValuesVisitor(context);
+ Assert.IsNotNull(createValuesVisitor, "null CreateValuesVisitor");
+
+ tlog.Debug(tag, $"CreateValuesVisitorConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("CreateValuesVisitor VisitingMode")]
[Property("SPEC", "Tizen.NUI.CreateValuesVisitor.VisitingMode A")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
+ [Description("ExpandMarkupsVisitor ExpandMarkupsVisitor")]
+ [Property("SPEC", "Tizen.NUI.ExpandMarkupsVisitor.ExpandMarkupsVisitor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void ExpandMarkupsVisitorConstructor()
+ {
+ tlog.Debug(tag, $"ApplyPropertiesVisitorConstructor START");
+
+ HydrationContext context = new HydrationContext();
+ Assert.IsNotNull(context, "null HydrationContext");
+ Assert.IsInstanceOf<HydrationContext>(context, "Should return HydrationContext instance.");
+
+ ExpandMarkupsVisitor expandMarkupsVisitor = new ExpandMarkupsVisitor(context);
+ Assert.IsNotNull(expandMarkupsVisitor, "null ExpandMarkupsVisitor");
+ Assert.IsInstanceOf<ExpandMarkupsVisitor>(expandMarkupsVisitor, "Should return ExpandMarkupsVisitor instance.");
+
+ tlog.Debug(tag, $"ExpandMarkupsVisitorConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("ExpandMarkupsVisitor VisitingMode")]
[Property("SPEC", "Tizen.NUI.ExpandMarkupsVisitor.VisitingMode A")]
[Property("SPEC_URL", "-")]
tlog.Debug(tag, $"ExpandMarkupsVisitorSkipChildren END");
}
+
+ public class IXmlNamespaceResolverImplement : IXmlNamespaceResolver
+ {
+ public IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupNamespace(string prefix)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupPrefix(string namespaceName)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ExpandMarkupsVisitor IsResourceDictionary")]
+ [Property("SPEC", "Tizen.NUI.ExpandMarkupsVisitor.IsResourceDictionary M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ExpandMarkupsVisitorIsResourceDictionary()
+ {
+ tlog.Debug(tag, $"ExpandMarkupsVisitorIsResourceDictionary START");
+
+ try
+ {
+ IList<XmlType> list = null;
+ XmlType xmlType = new XmlType("myNameSpace", "myName", list);
+ Assert.IsNotNull(xmlType, "null XmlType");
+
+ IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement();
+ Assert.IsNotNull(i1, "null IXmlNamespaceResolverImplement");
+ ElementNode n1 = new ElementNode(xmlType, "myNameSpace", i1);
+ Assert.IsNotNull(n1, "null ElementNode");
+
+ bool b1 = visitor.IsResourceDictionary(n1);
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ExpandMarkupsVisitorIsResourceDictionary END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ExpandMarkupsVisitor Visit")]
+ [Property("SPEC", "Tizen.NUI.ExpandMarkupsVisitor.Visit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ExpandMarkupsVisitorVisit()
+ {
+ tlog.Debug(tag, $"ExpandMarkupsVisitorVisit START");
+
+ try
+ {
+ IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement();
+ Assert.IsNotNull(i1, "null IXmlNamespaceResolverImplement");
+ MarkupNode markupnode = new MarkupNode("markup", i1);
+ Assert.IsNotNull(markupnode, "null MarkupNode");
+ INodeImpl parentNode = new INodeImpl();
+ Assert.IsNotNull(parentNode, "null INodeImplement");
+ visitor.Visit(markupnode, parentNode);
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ExpandMarkupsVisitorVisit END");
+ }
+
+ public class IServiceProviderImplement : IServiceProvider
+ {
+ public object GetService(Type serviceType)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("ExpandMarkupsVisitor Parse")]
+ //[Property("SPEC", "Tizen.NUI.ExpandMarkupsVisitor.MarkupExpansionParser.Parse M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void ExpandMarkupsVisitorParse()
+ //{
+ // tlog.Debug(tag, $"ExpandMarkupsVisitorParse START");
+
+ // try
+ // {
+ // MarkupExpansionParser markupExpansionParser = new MarkupExpansionParser();
+ // Assert.IsNotNull(markupExpansionParser, "null MarkupExpansionParser");
+ // IServiceProviderImplement serviceProviderImplement = new IServiceProviderImplement();
+ // Assert.IsNotNull(serviceProviderImplement, "null IServiceProviderImplement");
+
+ // string s1 = new string('a', 4);
+ // markupExpansionParser.Parse("matchString", ref s1, serviceProviderImplement);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"ExpandMarkupsVisitorParse END");
+ //}
}
}
\ No newline at end of file
[Test]
[Category("P1")]
+ [Description("FillResourceDictionariesVisitor FillResourceDictionariesVisitor")]
+ [Property("SPEC", "Tizen.NUI.FillResourceDictionariesVisitor.FillResourceDictionariesVisitor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void FillResourceDictionariesVisitorConstructor()
+ {
+ tlog.Debug(tag, $"FillResourceDictionariesVisitorConstructor START");
+
+ HydrationContext context = new HydrationContext();
+ Assert.IsNotNull(context, "null HydrationContext");
+
+ FillResourceDictionariesVisitor fillResourceDictionariesVisitor = new FillResourceDictionariesVisitor(context);
+ Assert.IsNotNull(fillResourceDictionariesVisitor, "null FillResourceDictionariesVisitor");
+ Assert.IsInstanceOf<FillResourceDictionariesVisitor>(fillResourceDictionariesVisitor, "Should return FillResourceDictionariesVisitor instance.");
+
+ tlog.Debug(tag, $"FillResourceDictionariesVisitorConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("FillResourceDictionariesVisitor VisitingMode")]
[Property("SPEC", "Tizen.NUI.FillResourceDictionariesVisitor.VisitingMode A")]
[Property("SPEC_URL", "-")]
tlog.Debug(tag, $"FillResourceDictionariesVisitorVisitNodeOnDataTemplate END");
}
+
+ public class IXmlNamespaceResolverImplement : IXmlNamespaceResolver
+ {
+ public IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupNamespace(string prefix)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupPrefix(string namespaceName)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("FillResourceDictionariesVisitor IsResourceDictionary")]
+ //[Property("SPEC", "Tizen.NUI.FillResourceDictionariesVisitor.IsResourceDictionary M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void FillResourceDictionariesVisitorIsResourceDictionary()
+ //{
+ // tlog.Debug(tag, $"FillResourceDictionariesVisitorVisitNodeOnDataTemplate START");
+
+ // try
+ // {
+ // IList<XmlType> list = null;
+ // XmlType xmlType = new XmlType("myNameSpace", "myName", list);
+ // Assert.IsNotNull(xmlType, "null XmlType");
+ // IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement();
+ // Assert.IsNotNull(i1, "null IXmlNamespaceResolverImplement");
+ // ElementNode n1 = new ElementNode(xmlType, "myNameSpace", i1);
+ // Assert.IsNotNull(n1, "null ElementNode");
+ // bool b1 = f1.IsResourceDictionary(n1);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"FillResourceDictionariesVisitorVisitNodeOnDataTemplate END");
+ //}
+
}
}
\ No newline at end of file
{
string str = new string('a', 4);
IServiceProviderImpl provider = new IServiceProviderImpl();
+ Assert.IsNotNull(provider, "null IServiceProviderImplement");
extParser.Parse("myMatch", ref str, provider);
}
catch (Exception e)
visitor = null;
tlog.Info(tag, "Destroy() is called!");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("NamescopingVisitor NamescopingVisitor")]
+ [Property("SPEC", "Tizen.NUI.NamescopingVisitor.NamescopingVisitor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void NamescopingVisitorConstructor()
+ {
+ tlog.Debug(tag, $"NamescopingVisitorConstructor START");
+
+ HydrationContext context = new HydrationContext();
+ Assert.IsNotNull(context, "null HydrationContext");
+
+ NamescopingVisitor namescoping = new NamescopingVisitor(context);
+ Assert.IsNotNull(namescoping, "null NamescopingVisitor");
+
+ tlog.Debug(tag, $"NamescopingVisitorConstructor END");
+ }
+ //[Test]
+ //[Category("P1")]
+ //[Description("NamescopingVisitor VisitingMode")]
+ //[Property("SPEC", "Tizen.NUI.NamescopingVisitor.VisitingMode A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void NamescopingVisitorVisitingMode()
+ //{
+ // tlog.Debug(tag, $"NamescopingVisitorVisitingMode START");
+
+ // try
+ // {
+ // Assert.IsNotNull(n1, "null NamescopingVisitor");
+ // TreeVisitingMode t1 = n1.VisitingMode;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"NamescopingVisitorVisitingMode END");
+
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("NamescopingVisitor StopOnDataTemplate")]
+ //[Property("SPEC", "Tizen.NUI.NamescopingVisitor.StopOnDataTemplate A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void NamescopingVisitorStopOnDataTemplate()
+ //{
+ // tlog.Debug(tag, $"NamescopingVisitorStopOnDataTemplate START");
+
+ // try
+ // {
+ // Assert.IsNotNull(n1, "null NamescopingVisitor");
+ // bool b1 = n1.StopOnDataTemplate;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"NamescopingVisitorStopOnDataTemplate END");
+
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("NamescopingVisitor StopOnResourceDictionary")]
+ //[Property("SPEC", "Tizen.NUI.NamescopingVisitor.StopOnResourceDictionary A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void NamescopingVisitorStopOnResourceDictionary()
+ //{
+ // tlog.Debug(tag, $"NamescopingVisitorStopOnResourceDictionary START");
+
+ // try
+ // {
+ // Assert.IsNotNull(n1, "null NamescopingVisitor");
+ // bool b1 = n1.StopOnResourceDictionary;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"NamescopingVisitorStopOnResourceDictionary END");
+
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("NamescopingVisitor VisitNodeOnDataTemplate")]
+ //[Property("SPEC", "Tizen.NUI.NamescopingVisitor.VisitNodeOnDataTemplate A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void NamescopingVisitorVisitNodeOnDataTemplate()
+ //{
+ // tlog.Debug(tag, $"NamescopingVisitorVisitNodeOnDataTemplate START");
+
+ // try
+ // {
+ // Assert.IsNotNull(n1, "null NamescopingVisitor");
+ // bool b1 = n1.VisitNodeOnDataTemplate;
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"NamescopingVisitorVisitNodeOnDataTemplate END");
+
+ //}
}
}
\ No newline at end of file
tlog.Debug(tag, $"NamescopingVisitorSkipChildren END");
}
+ public class IXmlNamespaceResolverImplement : IXmlNamespaceResolver
+ {
+ public IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupNamespace(string prefix)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string LookupPrefix(string namespaceName)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NamescopingVisitor IsResourceDictionary")]
+ [Property("SPEC", "Tizen.NUI.NamescopingVisitor.IsResourceDictionary M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void NamescopingVisitorIsResourceDictionary()
+ {
+ tlog.Debug(tag, $"NamescopingVisitorIsResourceDictionary START");
+
+ try
+ {
+ Assert.IsNotNull(visitor, "null PruneIgnoredNodesVisitor");
+ IList<XmlType> list = null;
+ XmlType xmlType = new XmlType("myNameSpace", "myName", list);
+
+ IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement();
+ ElementNode n1 = new ElementNode(xmlType, "myNameSpace", i1);
+
+ bool b1 = visitor.IsResourceDictionary(n1);
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"NamescopingVisitorIsResourceDictionary END");
+ }
}
}
\ No newline at end of file
try
{
- ReflectionExtensions.GetProperties(new TypeImpl());
+ TypeImpl type = new TypeImpl();
+ Assert.IsNotNull(type, "null TypeImpl");
+ ReflectionExtensions.GetProperties(type);
}
catch (Exception e)
{
tlog.Debug(tag, $"BindingExpressionConstructorNullBinding START");
BindingBase binding = null;
- try
- {
- var testingTarget = new BindingExpression(binding, selfpath);
- }
- catch (ArgumentNullException)
- {
- tlog.Debug(tag, $"BindingExpressionConstructorNullBinding END");
- Assert.Pass("Caught ArgumentNullException : Passed!");
- }
+ Assert.Throws<ArgumentNullException>(() => new BindingExpression(binding, selfpath));
+ tlog.Debug(tag, $"BindingExpressionConstructorNullBinding END");
}
[Test]
public void BindingExpressionConstructorNullPath()
{
tlog.Debug(tag, $"BindingExpressionConstructorNullPath START");
-
- try
- {
- var testingTarget = new BindingExpression(new TemplateBinding(), null);
- }
- catch (ArgumentNullException)
- {
- tlog.Debug(tag, $"BindingExpressionConstructorNullPath END");
- Assert.Pass("Caught ArgumentNullException : Passed!");
- }
+ Assert.Throws<ArgumentNullException>(() => new BindingExpression(new TemplateBinding(), null));
+ tlog.Debug(tag, $"BindingExpressionConstructorNullPath END");
}
[Test]
Assert.IsNotNull(testingTarget, "Can't create success object Vector2TypeConverter.");
Assert.IsInstanceOf<Vector2TypeConverter>(testingTarget, "Should return Vector2TypeConverter instance.");
- try
- {
- string str = null;
- var result = testingTarget.ConvertFromInvariantString(str);
- }
- catch (InvalidOperationException)
- {
- tlog.Debug(tag, $"Vector2TypeConverterConvertFromInvariantStringNullPath END");
- Assert.Pass("Caught InvalidOperationException : Passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => testingTarget.ConvertFromInvariantString(null));
+ tlog.Debug(tag, $"Vector2TypeConverterConvertFromInvariantStringNullPath END");
}
[Test]
public void Vector2TypeConverterFromStringInvalidOperationException()
{
tlog.Debug(tag, $"Vector2TypeConverterFromStringInvalidOperationException START");
-
- try
- {
- // length is 3
- Vector2TypeConverter.FromString("100, 50, 0.0f");
- }
- catch (InvalidOperationException)
- {
- tlog.Debug(tag, $"Vector2TypeConverterFromStringInvalidOperationException END");
- Assert.Pass("Caught InvalidOperationException : Passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => Vector2TypeConverter.FromString("100, 50, 0.0f"));
+ tlog.Debug(tag, $"Vector2TypeConverterFromStringInvalidOperationException END");
}
[Test]
result = testingTarget.ConvertFromInvariantString("100");
tlog.Debug(tag, "ConvertFromInvariantString : " + result);
- try
- {
- // lenght is 4
- result = testingTarget.ConvertFromInvariantString("100, 50, 30, 0.3f");
- }
- catch (InvalidOperationException)
- {
- tlog.Debug(tag, $"Vector3TypeConverterConvertFromInvariantString END");
- Assert.Pass("Caught InvalidOperationException : Passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => testingTarget.ConvertFromInvariantString("100, 50, 30, 0.3f"));
+ tlog.Debug(tag, $"Vector3TypeConverterConvertFromInvariantString END");
}
[Test]
// length is 1
result = testingTarget.ConvertFromInvariantString("100");
tlog.Debug(tag, "ConvertFromInvariantString : " + result);
-
- try
- {
- // lenght is 5
- result = testingTarget.ConvertFromInvariantString("100, 50, 30, 10, 0.3f");
- }
- catch (InvalidOperationException)
- {
- tlog.Debug(tag, $"Vector4TypeConverterConvertFromInvariantString END");
- Assert.Pass("Caught InvalidOperationException : Passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => testingTarget.ConvertFromInvariantString("100, 50, 30, 10, 0.3f"));
+ tlog.Debug(tag, $"Vector4TypeConverterConvertFromInvariantString END");
}
[Test]
result = testingTarget.ConvertFromInvariantString("100");
tlog.Debug(tag, "ConvertFromInvariantString : " + result);
- try
- {
- // lenght is 3
- result = testingTarget.ConvertFromInvariantString("100, 50, 30");
- }
- catch (InvalidOperationException)
- {
- tlog.Debug(tag, $"RelativeVector2TypeConverterConvertFromInvariantString END");
- Assert.Pass("Caught InvalidOperationException : Passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => testingTarget.ConvertFromInvariantString("100, 50, 30"));// lenght is 3
+
+ tlog.Debug(tag, $"RelativeVector2TypeConverterConvertFromInvariantString END");
}
[Test]
// length is 1
result = testingTarget.ConvertFromInvariantString("100");
tlog.Debug(tag, "ConvertFromInvariantString : " + result);
-
- try
- {
- // lenght is 4
- result = testingTarget.ConvertFromInvariantString("100, 50, 30, 10");
- }
- catch (InvalidOperationException)
- {
- tlog.Debug(tag, $"RelativeVector3TypeConverterConvertFromInvariantString END");
- Assert.Pass("Caught InvalidOperationException : Passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => testingTarget.ConvertFromInvariantString("100, 50, 30, 10"));
+ tlog.Debug(tag, $"RelativeVector3TypeConverterConvertFromInvariantString END");
}
[Test]
// length is 1
result = testingTarget.ConvertFromInvariantString("100");
tlog.Debug(tag, "ConvertFromInvariantString : " + result);
-
- try
- {
- // lenght is 5
- result = testingTarget.ConvertFromInvariantString("100, 50, 30, 10, 0.3f");
- }
- catch (InvalidOperationException)
- {
- tlog.Debug(tag, $"RelativeVector4TypeConverterConvertFromInvariantString END");
- Assert.Pass("Caught InvalidOperationException : Passed!");
- }
+ Assert.Throws<InvalidOperationException>(() => testingTarget.ConvertFromInvariantString("100, 50, 30, 10, 0.3f"));
+ tlog.Debug(tag, $"RelativeVector4TypeConverterConvertFromInvariantString END");
}
[Test]
tlog.Debug(tag, $"EXamlExtensionsLoadFromEXamlWithNullString END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXamlPath.")]
+ [Property("SPEC", "Tizen.NUI.EXaml.EXamlExtensions.LoadFromEXamlByRelativePath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,Type")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void LoadFromEXamlByRelativePath2()
+ {
+ tlog.Debug(tag, $"LoadFromEXamlByRelativePath2 START");
+
+ try
+ {
+ var testcase = new TotalSample(true);
+ Assert.True(true, "Should go here!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, e.StackTrace);
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"LoadFromEXamlByRelativePath2 END");
+ }
}
}
[Test]
[Category("P1")]
+ [Description("ApplicationResourcePathExtension ApplicationResourcePathExtension")]
+ [Property("SPEC", "Tizen.NUI.ApplicationResourcePathExtension.ApplicationResourcePathExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void ApplicationResourcePathExtensionConstructor()
+ {
+ tlog.Debug(tag, $"ApplicationResourcePathExtensionConstructor START");
+
+ ApplicationResourcePathExtension applicationResourcePathExtension = new ApplicationResourcePathExtension();
+ Assert.IsNotNull(applicationResourcePathExtension, "null ApplicationResourcePathExtension");
+ Assert.IsInstanceOf<ApplicationResourcePathExtension>(applicationResourcePathExtension, "Should return ApplicationResourcePathExtension instance.");
+
+ tlog.Debug(tag, $"ApplicationResourcePathExtensionConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("ApplicationResourcePathExtension FilePath ")]
[Property("SPEC", "Tizen.NUI.ApplicationResourcePathExtension.FilePath A")]
[Property("SPEC_URL", "-")]
try
{
- path.ProvideValue(new IServiceProviderImpl());
+ IServiceProviderImpl serviceProviderimplement = new IServiceProviderImpl();
+ Assert.IsNotNull(serviceProviderimplement, "null IServiceProviderImpl");
+ path.ProvideValue(serviceProviderimplement);
}
catch (Exception e)
{
using NUnit.Framework;
using System;
using System.Collections;
+using System.Collections.Generic;
using Tizen.NUI.Xaml;
namespace Tizen.NUI.Devel.Tests
array = null;
tlog.Info(tag, "Destroy() is called!");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("ArrayExtension ArrayExtension")]
+ [Property("SPEC", "Tizen.NUI.Xaml.ArrayExtension.ArrayExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void ArrayExtensionConstructor()
+ {
+ tlog.Debug(tag, $"ArrayExtensionConstructor START");
+
+ ArrayExtension arrayExtension = new ArrayExtension();
+ Assert.IsNotNull(arrayExtension, "null ArrayExtension");
+ Assert.IsInstanceOf<ArrayExtension>(arrayExtension, "Should return ArrayExtension instance.");
+
+ tlog.Debug(tag, $"ArrayExtensionConstructor END");
+ }
[Test]
[Category("P1")]
[Description("ArrayExtension Items")]
- [Property("SPEC", "Tizen.NUI.ArrayExtension.Items A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.ArrayExtension.Items A")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
+ [Property("CRITERIA", "PRO")]
public void ArrayExtensionItems()
{
tlog.Debug(tag, $"ArrayExtensionItems START");
try
{
+ Assert.IsNotNull(array, "null ArrayExtension");
var item = array.Items; // empty
tlog.Debug(tag, "Items : " + item);
}
[Test]
[Category("P1")]
+ [Description("ArrayExtension Type")]
+ [Property("SPEC", "Tizen.NUI.Xaml.ArrayExtension.Type A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ArrayExtensionType()
+ {
+ tlog.Debug(tag, $"ArrayExtensionType START");
+
+ try
+ {
+ Type t1 = array.Type;
+ array.Type = t1;
+ Assert.AreEqual(t1, array.Type, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ArrayExtensionType END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("ArrayExtension ProvideValue")]
- [Property("SPEC", "Tizen.NUI.ArrayExtension.ProvideValue A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.ArrayExtension.ProvideValue A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
public void ArrayExtensionProvideValue()
try
{
+ IServiceProviderImpl serviceProviderimplement = new IServiceProviderImpl();
+ Assert.IsNotNull(serviceProviderimplement, "null IServiceProviderimplement");
+ Assert.IsInstanceOf<IServiceProviderImpl>(serviceProviderimplement, "Should return IServiceProviderImpl instance.");
+ array.Items.Add("string");
array.Type = typeof(string);
- tlog.Debug(tag, "Type : " + array.Type);
- array.ProvideValue(new IServiceProviderImpl());
+
+ array.ProvideValue(serviceProviderimplement);
}
catch (Exception e)
{
[Test]
[Category("P2")]
[Description("ArrayExtension ProvideValue")]
- [Property("SPEC", "Tizen.NUI.ArrayExtension.ProvideValue A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.ArrayExtension.ProvideValue A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
public void ArrayExtensionProvideValueWithNullType()
[Test]
[Category("P1")]
+ [Description("BindingExtension BindingExtension")]
+ [Property("SPEC", "Tizen.NUI.BindingExtension.BindingExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void BindingExtensionConstructor()
+ {
+ tlog.Debug(tag, $"BindingExtensionConstructor START");
+
+ BindingExtension binding = new BindingExtension();
+ Assert.IsNotNull(binding, "null BindingExtension");
+ Assert.IsInstanceOf<BindingExtension>(binding, "Should return BindingExtension instance.");
+
+ tlog.Debug(tag, $"BindingExtensionConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("BindingExtension Path")]
[Property("SPEC", "Tizen.NUI.BindingExtension.Path A")]
[Property("SPEC_URL", "-")]
using NUnit.Framework;
using System;
+using System.Xml;
using Tizen.NUI.Xaml;
namespace Tizen.NUI.Devel.Tests
[Test]
[Category("P1")]
[Description("DynamicResourceExtension Key")]
- [Property("SPEC", "Tizen.NUI.DynamicResourceExtension.Key A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.DynamicResourceExtension.Key A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
public void DynamicResourceExtensionKey()
[Test]
[Category("P1")]
[Description("DynamicResourceExtension Key")]
- [Property("SPEC", "Tizen.NUI.DynamicResourceExtension.Key A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.DynamicResourceExtension.Key M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
+ [Property("CRITERIA", "MR")]
public void DynamicResourceExtensionProvideValue()
{
tlog.Debug(tag, $"DynamicResourceExtensionProvideValue START");
tlog.Debug(tag, $"DynamicResourceExtensionProvideValue END");
}
+
+ [Test]
+ [Category("P2")]
+ [Description("DynamicResourceExtension Key")]
+ [Property("SPEC", "Tizen.NUI.Xaml.DynamicResourceExtension.Key M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void DynamicResourceExtensionProvideValue2()
+ {
+ tlog.Debug(tag, $"DynamicResourceExtensionProvideValue2 START");
+ resExtension.Key = null;
+ Assert.Throws<XamlParseException>(() => resExtension.ProvideValue(new IServiceProviderImpl()));
+ tlog.Debug(tag, $"DynamicResourceExtensionProvideValue2 END");
+ }
}
}
\ No newline at end of file
[Test]
[Category("P1")]
+ [Description("NUIResourcePathExtension NUIResourcePathExtension")]
+ [Property("SPEC", "Tizen.NUI.NUIResourcePathExtension.NUIResourcePathExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void NUIResourcePathExtensionConstructor()
+ {
+ tlog.Debug(tag, $"NUIResourcePathExtensionConstructor START");
+
+ NUIResourcePathExtension nUIResourcePathExtension = new NUIResourcePathExtension();
+ Assert.IsNotNull(nUIResourcePathExtension, "null NUIResourcePathExtension");
+ Assert.IsInstanceOf<NUIResourcePathExtension>(nUIResourcePathExtension, "Should return NUIResourcePathExtension instance.");
+
+ tlog.Debug(tag, $"NUIResourcePathExtensionConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("NUIResourcePathExtension FilePath")]
[Property("SPEC", "Tizen.NUI.NUIResourcePathExtension.FilePath A")]
[Property("SPEC_URL", "-")]
using NUnit.Framework.TUnit;
using Tizen.NUI.Components;
using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Xaml;
+using Tizen.NUI.Binding.Internals;
namespace Tizen.NUI.Devel.Tests
{
public object GetService(Type serviceType) { return null; }
}
+ internal class IServiceProviderImpl2 : IServiceProvider
+ {
+ public object GetService(Type serviceType) { return new NameScopeProvider() { NameScope = new NameScope() { } }; }
+ }
+
[SetUp]
public void Init()
{
public void ReferenceExtensionProvideValue()
{
tlog.Debug(tag, $"ReferenceExtensionProvideValue START");
+ Assert.Throws<ArgumentException>(() => reference.ProvideValue(new IServiceProviderImpl()));
+ tlog.Debug(tag, $"ReferenceExtensionProvideValue END");
+ }
- try
- {
- reference.ProvideValue(new IServiceProviderImpl()); // serviceProvider is null
- }
- catch (ArgumentException e)
- {
- tlog.Debug(tag, e.Message.ToString());
- tlog.Debug(tag, $"ReferenceExtensionProvideValue END");
- Assert.Pass("Caught ArgumentException : Passed!");
- }
-
-
+ [Test]
+ [Category("P2")]
+ [Description("ReferenceExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.ReferenceExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ReferenceExtensionProvideValue2()
+ {
+ tlog.Debug(tag, $"ReferenceExtensionProvideValue2 START");
+ Assert.Throws<ArgumentNullException>(() => reference.ProvideValue(null));
+ tlog.Debug(tag, $"ReferenceExtensionProvideValue2 END");
}
}
}
\ No newline at end of file
{
public object GetService(Type serviceType) { return null; }
}
+ internal class IServiceProviderImpl2 : IServiceProvider
+ {
+ public object GetService(Type serviceType) {
+ var xml = new XmlNamespaceResolver();
+ xml.Add("l", "Tizen.NUI.Devel.Tests");
+ return new XamlTypeResolver(xml, typeof(UIElement).Assembly);
+ }
+ }
[SetUp]
public void Init()
[Test]
[Category("P1")]
[Description("StaticExtension Member")]
- [Property("SPEC", "Tizen.NUI.StaticExtension.Member A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticExtension.Member A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
public void StaticExtensionMember()
}
[Test]
- [Category("P1")]
+ [Category("P2")]
[Description("StaticExtension ProvideValue")]
- [Property("SPEC", "Tizen.NUI.StaticExtension.ProvideValue M")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticExtension.ProvideValue M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
public void StaticExtensionProvideValue()
{
tlog.Debug(tag, $"StaticExtensionProvideValue START");
+ Assert.Throws<ArgumentNullException>(() => sExtention.ProvideValue(null));
+ tlog.Debug(tag, $"StaticExtensionProvideValue END");
+ }
- try
- {
- sExtention.ProvideValue(new IServiceProviderImpl()); // IXamlTypeResolver is null
- }
- catch (ArgumentException e)
- {
- tlog.Debug(tag, e.Message.ToString());
- tlog.Debug(tag, $"StaticExtensionProvideValue END");
- Assert.Pass("Caught ArgumentException : Passed!");
- }
+ [Test]
+ [Category("P2")]
+ [Description("StaticExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void StaticExtensionProvideValue2()
+ {
+ tlog.Debug(tag, $"StaticExtensionProvideValue2 START");
+ Assert.Throws<ArgumentException>(() => sExtention.ProvideValue(new IServiceProviderImpl()));
+ tlog.Debug(tag, $"StaticExtensionProvideValue2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("StaticExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void StaticExtensionProvideValue3()
+ {
+ tlog.Debug(tag, $"StaticExtensionProvideValue3 START");
+ sExtention.Member = null;
+ Assert.Throws<XamlParseException>(() => sExtention.ProvideValue(new IServiceProviderImpl2()));
+ tlog.Debug(tag, $"StaticExtensionProvideValue3 END");
}
}
}
\ No newline at end of file
[Test]
[Category("P1")]
+ [Description("TemplateBindingExtension TemplateBindingExtension")]
+ [Property("SPEC", "Tizen.NUI.TemplateBindingExtension.TemplateBindingExtension C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void TemplateBindingExtensionConstructor()
+ {
+ tlog.Debug(tag, $"TemplateBindingExtensionConstructor START");
+
+ TemplateBindingExtension templateBindingExtension = new TemplateBindingExtension();
+ Assert.IsNotNull(templateBindingExtension, "null TemplateBindingExtension");
+ Assert.IsInstanceOf<TemplateBindingExtension>(templateBindingExtension, "Should return TemplateBindingExtension instance.");
+
+ tlog.Debug(tag, $"TemplateBindingExtensionConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("TemplateBindingExtension Path")]
[Property("SPEC", "Tizen.NUI.TemplateBindingExtension.Path A")]
[Property("SPEC_URL", "-")]
public object GetService(Type serviceType) { return null; }
}
+ internal class IXamlTypeResolverImpl : IXamlTypeResolver
+ {
+ Type IXamlTypeResolver.Resolve(string qualifiedTypeName, IServiceProvider serviceProvider)
+ {
+ return typeof(string);
+ }
+
+ bool IXamlTypeResolver.TryResolve(string qualifiedTypeName, out Type type)
+ {
+ type = typeof(string);
+ return true;
+ }
+ }
+
+ internal class IServiceProviderImpl2 : IServiceProvider
+ {
+ public object GetService(Type serviceType) { return new IXamlTypeResolverImpl(); }
+ }
+
[SetUp]
public void Init()
{
[Test]
[Category("P1")]
[Description("TypeExtension TypeName")]
- [Property("SPEC", "Tizen.NUI.TypeExtension.TypeName A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.TypeExtension.TypeName A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
public void TypeExtensionTypeName()
[Test]
[Category("P2")]
[Description("TypeExtension ProvideValue")]
- [Property("SPEC", "Tizen.NUI.TypeExtension.ProvideValue M")]
+ [Property("SPEC", "Tizen.NUI.Xaml.TypeExtension.ProvideValue M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
public void TypeExtensionProvideValue()
{
tlog.Debug(tag, $"TypeExtensionProvideValue START");
+ tExtension.TypeName = this.GetType().ToString();
+ Assert.Throws<ArgumentException>(() => tExtension.ProvideValue(new IServiceProviderImpl()));
+ tlog.Debug(tag, $"TypeExtensionProvideValue END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("TypeExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.Xaml.TypeExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void TypeExtensionProvideValue2()
+ {
+ tlog.Debug(tag, $"TypeExtensionProvideValue2 START");
+ Assert.Throws<InvalidOperationException>(() => tExtension.ProvideValue(null));
+ tlog.Debug(tag, $"TypeExtensionProvideValue2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("TypeExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.Xaml.TypeExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void TypeExtensionProvideValue3()
+ {
+ tlog.Debug(tag, $"TypeExtensionProvideValue3 START");
+ tExtension.TypeName = this.GetType().ToString();
+ Assert.Throws<ArgumentNullException>(() => tExtension.ProvideValue(null));
+ tlog.Debug(tag, $"TypeExtensionProvideValue3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.Xaml.TypeExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void TypeExtensionProvideValue4()
+ {
+ tlog.Debug(tag, $"TypeExtensionProvideValue4 START");
+
try
{
tExtension.TypeName = this.GetType().ToString();
- var type = tExtension.ProvideValue(new IServiceProviderImpl());
- tlog.Error(tag, "Type : " + type);
+ var ret = tExtension.ProvideValue(new IServiceProviderImpl2());
+ Assert.IsNotNull(ret, "Should not be null");
}
- catch (ArgumentException e) // typeResolver is null
+ catch (Exception e)
{
- tlog.Error(tag, e.Message.ToString());
- tlog.Debug(tag, $"TypeExtensionProvideValue END");
- Assert.Pass("Caught Exception : Passed!");
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
+ tlog.Debug(tag, $"TypeExtensionProvideValue4 END");
}
}
}
\ No newline at end of file
{
private const string tag = "NUITEST";
private StaticResourceExtension staticRes;
+
+ private class ServiceProviderImpl : IServiceProvider
+ {
+ private static readonly object service = new object();
+
+ public object GetService(Type type)
+ {
+ return service;
+ }
+ }
+
+ private class XmlLineInfoImplent : IXmlLineInfo
+ {
+ public int LineNumber => 16;
+
+ public int LinePosition => 8;
+
+ public bool HasLineInfo()
+ {
+ return true;
+ }
+ }
+
[SetUp]
public void Init()
{
[Test]
[Category("P1")]
[Description("StaticResourceExtension Key")]
- [Property("SPEC", "Tizen.NUI.StaticResourceExtension.Key A")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticResourceExtension.Key A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
public void StaticResourceExtensionKey()
}
tlog.Debug(tag, $"StaticResourceExtensionKey END");
}
+
+ [Test]
+ [Category("P2")]
+ [Description("StaticResourceExtension Key")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticResourceExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ProvideValueTest()
+ {
+ tlog.Debug(tag, $"ProvideValueTest START");
+
+ var sr = new StaticResourceExtension();
+ Assert.Throws<ArgumentNullException>(() => sr.ProvideValue(null));
+
+ tlog.Debug(tag, $"ProvideValueTest END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("StaticResourceExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticResourceExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ProvideValueTest2()
+ {
+ tlog.Debug(tag, $"ProvideValueTest2 START");
+
+ var sr = new StaticResourceExtension();
+ Assert.Throws<XamlParseException>(() => sr.ProvideValue(new ServiceProviderImpl()));
+
+ tlog.Debug(tag, $"ProvideValueTest2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("StaticResourceExtension ProvideValue")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticResourceExtension.ProvideValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ProvideValueTest3()
+ {
+ tlog.Debug(tag, $"ProvideValueTest3 START");
+
+ var sr = new StaticResourceExtension();
+ sr.Key = "Key";
+ Assert.Throws<ArgumentException>(() => sr.ProvideValue(new ServiceProviderImpl()));
+
+ tlog.Debug(tag, $"ProvideValueTest3 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("StaticResourceExtension GetApplicationLevelResource")]
+ [Property("SPEC", "Tizen.NUI.Xaml.StaticResourceExtension.GetApplicationLevelResource M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GetApplicationLevelResourceTest()
+ {
+ tlog.Debug(tag, $"GetApplicationLevelResourceTest START");
+
+ var sr = new StaticResourceExtension();
+ Assert.Throws<ArgumentNullException>(() => sr.GetApplicationLevelResource("key", null));
+
+ tlog.Debug(tag, $"GetApplicationLevelResourceTest END");
+ }
}
}
\ No newline at end of file
public void Init()
{
tlog.Info(tag, "Init() is called!");
- TypeConversionAttribute conversionAttr = new TypeConversionAttribute(typeof(string));
}
[TearDown]
conversionAttr = null;
tlog.Info(tag, "Destroy() is called!");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeConversionAttribute TypeConversionAttribute")]
+ [Property("SPEC", "Tizen.NUI.Xaml.TypeConversionAttribute.TypeConversionAttribute C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void TypeConversionAttributeConstructor()
+ {
+ tlog.Debug(tag, $"TypeConversionAttributeConstructor START");
+ Type type = typeof(string);
+ TypeConversionAttribute t2 = new TypeConversionAttribute(type);
+ Assert.IsNotNull(t2, "null TypeConversionAttribute");
+ Assert.IsInstanceOf<TypeConversionAttribute>(t2, "Should return TypeConversionAttribute instance.");
+ tlog.Debug(tag, $"TypeConversionAttributeConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeConversionAttribute TargetType")]
+ [Property("SPEC", "Tizen.NUI.Xaml.TypeConversionAttribute.TargetType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void TypeConversionAttributeTargetType()
+ {
+ tlog.Debug(tag, $"TypeConversionAttributeTargetType START");
+ try
+ {
+
+ Type type = typeof(string);
+ TypeConversionAttribute t1 = new TypeConversionAttribute(type);
+ Assert.AreEqual(type, t1.TargetType, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"TypeConversionAttributeTargetType END");
+ }
}
}
\ No newline at end of file
using NUnit.Framework;
using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Xaml;
namespace Tizen.NUI.Devel.Tests
{
{
private const string tag = "NUITEST";
+ string content = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "\r\n<View x:Class=\"Tizen.NUI.Devel.Tests.TotalSample\"" +
+ "\r\n xmlns=\"http://tizen.org/Tizen.NUI/2018/XAML\"" +
+ "\r\n xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\" >" +
+ "\r\n" +
+ "\r\n <View Size=\"100,100\" Position=\"10,10\" Margin=\"1,2,3,4\" BackgroundColor=\"Red\" ParentOrigin=\"TopLeft\" PivotPoint=\"TopLeft\" PositionUsesPivotPoint=\"true\"/>" +
+ "\r\n <TextLabel Size2D=\"100,100\" Position2D=\"10,110\" Text=\"text label\" PointSize=\"8\" TextColor=\"Red\" MultiLine=\"True\" LineWrapMode=\"Character\" WidthSpecification=\"-1\" HeightSpecification=\"-2\" />" +
+ "\r\n <ImageView ResourceUrl=\"*Resource*/button_9patch.png\" Border=\"1,1,1,1\" Size=\"100,100\" Position=\"10,210\" PixelArea=\"0.1,0.0,0.4,0.6\" />" +
+ "\r\n</View>";
+
[SetUp]
public void Init()
{
}
[Test]
- [Category("P1")]
+ [Category("P2")]
[Description("Extensions LoadFromXaml")]
- [Property("SPEC", "Tizen.NUI.Extensions.LoadFromXaml M")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "string,Type")]
public void ExtensionsLoadFromXaml1()
{
- tlog.Debug(tag, $"ExtensionsLoadFromXaml START");
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml1 START");
+
+ try
+ {
+ Tizen.NUI.Xaml.Extensions.LoadFromXaml<string>("mystring", typeof(string)); //XamlParseException e.Message: Can't find type System.String in embedded resource
+ Assert.True(true, "Should go here!");
+ }
+ catch (XamlParseException e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.True(true, "Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXamlPath.")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXamlPath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,Type")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtensionsLoadFromXaml2()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml2 START");
+
+ try
+ {
+ var testcase = new TotalSample();
+ Assert.True(true, "Should go here!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, e.StackTrace);
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXaml")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,string")]
+ public void ExtensionsLoadFromXaml3()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml3 START");
+ try
+ {
+ View view = new View();
+ Tizen.NUI.Xaml.Extensions.LoadFromXaml<View>(view, content);
+ Assert.True(true, "Should go here!");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXaml.")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,Type")]
+ public void ExtensionsLoadFromXaml4()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml4 START");
+
+ try
+ {
+ var testcase = new XamlStyleSample();
+ Assert.True(true, "Should go here!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, e.StackTrace);
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml4 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Extensions LoadFromXaml")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,string")]
+ public void ExtensionsLoadFromXaml5()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml5 START");
+ string content = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "\r\n<View x:Class=\"Tizen.NUI.Tests.TotalSample\"" +
+ "\r\n xmlns=\"http://tizen.org/Tizen.NUI/2018/XAML\"" +
+ "\r\n xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\" >" +
+ "\r\n" +
+ "\r\n <View Size=\"100,100\" Position=\"10,10\" MarginX=\"1,2,3,4\" BackgroundColor=\"Red\" />" +
+ "\r\n</View>";
+ try
+ {
+ View view = new View();
+ Tizen.NUI.Xaml.Extensions.LoadFromXaml<View>(view, content); //MarginX don't exist
+ Assert.Fail("Should not go here");
+ }
+ catch (XamlParseException e)
+ {
+ tlog.Fatal(tag, "Caught Exception" + e.ToString());
+ Assert.True(true, "Should throw exception");
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml5 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXaml.")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,Type")]
+ public void ExtensionsLoadFromXaml6()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml6 START");
+
+ try
+ {
+ var testcase = new BindingSample();
+ Assert.True(true, "Should go here!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, e.StackTrace);
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml6 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXaml.")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,Type")]
+ public void ExtensionsLoadFromXaml7()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml7 START");
+
+ try
+ {
+ var testcase = new ClockView();
+ Assert.True(true, "Should go here!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, e.StackTrace);
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml7 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXaml.")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,Type")]
+ public void ExtensionsLoadFromXaml8()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml8 START");
try
{
- Tizen.NUI.Xaml.Extensions.LoadFromXaml<string>("mystring", typeof(string));
+ var testcase = new HslColorScrollView();
+ Assert.True(true, "Should go here!");
}
catch (Exception e)
{
tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception : Failed!");
+ tlog.Debug(tag, e.StackTrace);
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml8 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXaml.")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "TXaml,Type")]
+ public void ExtensionsLoadFromXaml9()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml9 START");
+
+ try
+ {
+ var testcase = new StaticDateTimeView();
+ Assert.True(true, "Should go here!");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, e.StackTrace);
+ Assert.Fail("Caught Exception: Failed!");
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXaml9 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadObject")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadObject M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ExtensionsLoadObject1()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadObject1 START");
+ try
+ {
+ string res = global::Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+ Tizen.NUI.Xaml.Extensions.LoadObject<View>(res + "/layout/BaseXamlSample.xaml");
+ Assert.True(true, "Should go here");
+ }
+ catch (XamlParseException e)
+ {
+ tlog.Fatal(tag, "Caught Exception" + e.ToString());
+ Assert.False(true, "Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ExtensionsLoadObject1 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Extensions LoadObject")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadObject M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ExtensionsLoadObject2()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadObject2 START");
+ string content = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "\r\n<View x:Class=\"Tizen.NUI.Tests.TotalSample\"" +
+ "\r\n xmlns=\"http://tizen.org/Tizen.NUI/2018/XAML\"" +
+ "\r\n xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\" >" +
+ "\r\n" +
+ "\r\n <View Size=\"100,100\" Position=\"10,10\" Margin=\"1,2,3,4\" BackgroundColor=\"Red\" ParentOrigin=\"TopLeft\" PivotPoint=\"TopLeft\" PositionUsesPivotPoint=\"true\"/>" +
+ "\r\n</View>";
+ try
+ {
+ Tizen.NUI.Xaml.Extensions.LoadObject<string>("mypath");
+ Assert.Fail("Should not go here");
+ }
+ catch (XamlParseException e)
+ {
+ tlog.Fatal(tag, "Caught Exception" + e.ToString());
+ Assert.True(true, "Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ExtensionsLoadObject2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXamlFile")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXamlFile M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ExtensionsLoadFromXamlFile()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXamlFile START");
+ try
+ {
+ View view = new View();
+ Tizen.NUI.Xaml.Extensions.LoadFromXamlFile<View>(view, "BaseXamlSample");
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXamlFile END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Extensions LoadFromXamlFile")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXamlFile M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ExtensionsLoadFromXamlFile2()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXamlFile2 START");
+ try
+ {
+ Layer view = new Layer();
+ Tizen.NUI.Xaml.Extensions.LoadFromXamlFile<Layer>(view, "BaseXamlSample2"); // new StringReader(null) will throw exception.
+ Assert.Fail("Should not go here");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.True(true, "Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ExtensionsLoadFromXamlFile2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extensions LoadFromXamlFile")]
+ [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXamlFile M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ExtensionsLoadFromXamlFile3()
+ {
+ tlog.Debug(tag, $"ExtensionsLoadFromXamlFile3 START");
+ try
+ {
+ var view = new Layer();
+ Tizen.NUI.Xaml.Extensions.LoadFromXamlFile<Layer>(view, "BaseXamlSample3");
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
}
- tlog.Debug(tag, $"ExtensionsLoadFromXaml END");
+ tlog.Debug(tag, $"ExtensionsLoadFromXamlFile3 END");
}
}
}
\ No newline at end of file
+++ /dev/null
-using global::System;
-using NUnit.Framework;
-using NUnit.Framework.TUnit;
-using Tizen.NUI.Components;
-using Tizen.NUI.BaseComponents;
-using System.Collections.Generic;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Xaml")]
- public class PublicXamlTest
- {
- private const string tag = "NUITEST";
- private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "index.xml";
- private string eXamlString = "<?xml?><?xml-stylesheet?>";
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("EXamlExtensions LoadFromXamlPath.")]
- [Property("SPEC", "Tizen.NUI.XamlExtensions.LoadFromXamlPath M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void EXamlExtensionsLoadFromEXamlPath()
- {
- tlog.Debug(tag, $"EXamlExtensionsLoadFromEXamlPath START");
-
- using (View view = new View())
- {
- try
- {
- var testcase = new TotalSample();
- }
- catch (Exception e)
- {
- tlog.Debug(tag, e.Message.ToString());
- Assert.Fail("Caught Exception: Failed!");
- }
- }
-
- tlog.Debug(tag, $"EXamlExtensionsLoadFromEXamlPath END (OK)");
- }
- }
-}
testingTarget = null;
tlog.Debug(tag, $"XamlParseExceptionConstructorWithMessage END");
}
+ [Test]
+ [Category("P1")]
+ [Description("XamlParseException XamlParseException")]
+ [Property("SPEC", "Tizen.NUI.XamlParseException.XamlParseException C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void XamlParseExceptionConstructor3()
+ {
+ tlog.Debug(tag, $"XamlParseExceptionConstructor START");
+
+ Exception e1 = new Exception();
+ XamlParseException x3 = new XamlParseException("myMessage", e1);
+ Assert.IsNotNull(x3, "null XamlParseException");
+ Assert.IsInstanceOf<XamlParseException>(x3, "Should return XamlParseException instance.");
+ x3 = null;
+ tlog.Debug(tag, $"XamlParseExceptionConstructor END");
+ }
[Test]
[Category("P1")]
{
private const string tag = "NUITEST";
private XamlResourceIdAttribute resourceId;
+
+ private class AssemblyImplent : Assembly
+ {
+ public override object[] GetCustomAttributes(bool inherit)
+ {
+ return null;
+ }
+ }
+
[SetUp]
public void Init()
{
[Test]
[Category("P1")]
+ [Description("XamlResourceIdAttribute XamlResourceIdAttribute")]
+ [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.XamlResourceIdAttribute C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void XamlResourceIdAttributeConstructor()
+ {
+ tlog.Debug(tag, $"XamlResourceIdAttributeConstructor START");
+
+ XamlResourceIdAttribute x1 = new XamlResourceIdAttribute("myId", "myPath", typeof(string));
+ Assert.IsNotNull(x1, "null XamlResourceIdAttribute");
+ Assert.IsInstanceOf<XamlResourceIdAttribute>(x1, "Should return XamlResourceIdAttribute instance.");
+ tlog.Debug(tag, $"XamlResourceIdAttributeConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("XamlResourceIdAttribute ResourceId")]
[Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.ResourceId A")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
+ [Description("XamlResourceIdAttribute GetResourceIdForPath")]
+ [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetResourceIdForPath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlResourceIdAttributeGetResourceIdForPath()
+ {
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForPath START");
+
+ try
+ {
+ var ret = XamlResourceIdAttribute.GetResourceIdForPath(typeof(UIElement).Assembly, "testcase.public.Xaml.TotalSample.ClockView.xaml");
+ Assert.IsNotNull(ret, "Shouldn't be null");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForPath END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlResourceIdAttribute GetResourceIdForPath")]
+ [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetResourceIdForPath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlResourceIdAttributeGetResourceIdForPath2()
+ {
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForPath2 START");
+
+ try
+ {
+ var ret = XamlResourceIdAttribute.GetResourceIdForPath(typeof(UIElement).Assembly, "none.xaml");
+ Assert.IsNull(ret, "Should be null");
+
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetResourceIdForPath2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlResourceIdAttribute GetTypeForResourceId")]
+ [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetTypeForResourceId M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlResourceIdAttributeGetTypeForResourceId()
+ {
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForResourceId START");
+
+ try
+ {
+ var ret = XamlResourceIdAttribute.GetTypeForResourceId(typeof(UIElement).Assembly, "Tizen.NUI.Devel.Tests.testcase.public.Xaml.TotalSample.ClockView.xaml");
+ Assert.IsNotNull(ret, "Shouldn't be null");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForResourceId END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlResourceIdAttribute GetTypeForResourceId")]
+ [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetTypeForResourceId M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlResourceIdAttributeGetTypeForResourceId2()
+ {
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForResourceId2 START");
+
+ try
+ {
+ var ret = XamlResourceIdAttribute.GetTypeForResourceId(typeof(UIElement).Assembly, "none.xaml");
+ Assert.IsNull(ret, "Should be null");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForResourceId2 END");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("XamlResourceIdAttribute GetPathForType")]
[Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetPathForType M")]
[Property("SPEC_URL", "-")]
try
{
- XamlResourceIdAttribute.GetPathForType(typeof(string));
+ var ret = XamlResourceIdAttribute.GetPathForType(typeof(TotalSample));
+ Assert.IsNotNull(ret, "Shouldn't be null");
}
catch (Exception e)
{
tlog.Debug(tag, $"XamlResourceIdAttributeGetPathForType END");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlResourceIdAttribute GetTypeForPath")]
+ [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetTypeForPath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlResourceIdAttributeGetTypeForPath()
+ {
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForPath START");
+
+ try
+ {
+ var ret = XamlResourceIdAttribute.GetTypeForPath(typeof(UIElement).Assembly, "testcase.public.Xaml.TotalSample.ClockView.xaml");
+ Assert.IsNotNull(ret, "Shouldn't be null");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForPath END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlResourceIdAttribute GetTypeForPath")]
+ [Property("SPEC", "Tizen.NUI.XamlResourceIdAttribute.GetTypeForPath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlResourceIdAttributeGetTypeForPath2()
+ {
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForPath2 START");
+
+ try
+ {
+ var ret = XamlResourceIdAttribute.GetTypeForPath(typeof(UIElement).Assembly, "none.xaml");
+ Assert.IsNull(ret, "Should be null");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlResourceIdAttributeGetTypeForPath2 END");
+ }
}
}
\ No newline at end of file
tlog.Info(tag, "Destroy() is called!");
}
+ private class INodeImplement : INode
+ {
+ public List<string> IgnorablePrefixes { get; set; }
+ public IXmlNamespaceResolver NamespaceResolver { get; }
+ public INode Parent { get; set; }
+
+ public void Accept(IXamlNodeVisitor visitor, INode parentNode)
+ {
+
+ }
+ public INode Clone()
+ {
+ return null;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider XamlServiceProvider")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.XamlServiceProvider C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void XamlServiceProviderConstructor1()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderConstructor START");
+
+ XamlServiceProvider xamlServiceProvider1 = new XamlServiceProvider();
+ Assert.IsNotNull(xamlServiceProvider1, "null XamlServiceProvider");
+ Assert.IsInstanceOf<XamlServiceProvider>(xamlServiceProvider1, "Should return XamlServiceProvider instance.");
+ tlog.Debug(tag, $"XamlServiceProviderConstructor END");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("XamlServiceProvider XamlServiceProvider")]
+ //[Property("SPEC", "Tizen.NUI.XamlServiceProvider.XamlServiceProvider C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //public void XamlServiceProviderConstructor2()
+ //{
+ // tlog.Debug(tag, $"XamlServiceProviderConstructor START");
+
+ // HydrationContext hydrationContext = new HydrationContext();
+ // INodeImplement nodeImplement = new INodeImplement();
+ // XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider(nodeImplement, hydrationContext);
+ // Assert.IsNotNull(xamlServiceProvider2, "null XamlServiceProvider");
+ // Assert.IsInstanceOf<XamlServiceProvider>(xamlServiceProvider2, "Should return XamlServiceProvider instance.");
+ // tlog.Debug(tag, $"XamlServiceProviderConstructor END");
+ //}
+
[Test]
[Category("P1")]
[Description("XamlServiceProvider IProvideValueTarget")]
tlog.Debug(tag, $"XamlServiceProviderFindByName END");
}
+
+ public class IXmlNamespaceResolverImplement : IXmlNamespaceResolver
+ {
+ public IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)
+ {
+ return null;
+ }
+
+ public string LookupNamespace(string prefix)
+ {
+ return "mySpace";
+ }
+
+ public string LookupPrefix(string namespaceName)
+ {
+ return "myPrefix";
+ }
+ }
+
+ public class AssemblyImplement : Assembly
+ {
+
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider XamlTypeResolver")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.XamlTypeResolver M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlServiceProviderXamlTypeResolver()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderXamlTypeResolver START");
+
+ try
+ {
+ IXmlNamespaceResolverImplement xmlNamespaceResolverImplement = new IXmlNamespaceResolverImplement();
+ AssemblyImplement currentAssembly = new AssemblyImplement();
+ XamlTypeResolver xamlTypeResolver = new XamlTypeResolver(xmlNamespaceResolverImplement, currentAssembly);
+ Assert.IsNotNull(xamlTypeResolver, "null XamlTypeResolver");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderXamlTypeResolver END (OK)");
+ Assert.Pass("XamlServiceProviderXamlTypeResolver");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider RootObject")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.RootObject A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void XamlServiceProviderRootObject()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderRootObject START");
+
+ try
+ {
+ object o1 = new object();
+ XamlRootObjectProvider x1 = new XamlRootObjectProvider(o1);
+ Assert.IsNotNull(x1, "null XamlRootObjectProvider");
+ object o2 = x1.RootObject;
+ Assert.IsNotNull(o2, "null object");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderRootObject END");
+ }
+
+ public class IXmlLineInfoImplement : IXmlLineInfo
+ {
+ public int LineNumber
+ {
+ get => 1;
+ set { }
+ }
+
+
+ public int LinePosition => throw new NotImplementedException();
+
+ public bool HasLineInfo()
+ {
+ return true;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider XmlLineInfoProvider")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.XmlLineInfoProvider M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlServiceProviderXmlLineInfoProvider()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderXmlLineInfoProvider START");
+
+ try
+ {
+ IXmlLineInfoImplement xmlLineInfo = new IXmlLineInfoImplement();
+ XmlLineInfoProvider x1 = new XmlLineInfoProvider(xmlLineInfo);
+ Assert.IsNotNull(x1, "null XmlLineInfoProvider");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderXmlLineInfoProvider END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider XmlLineInfo")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.XmlLineInfo A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void XamlServiceProviderXmlLineInfo()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderXmlLineInfo START");
+
+ try
+ {
+ IXmlLineInfoImplement xmlLineInfo = new IXmlLineInfoImplement();
+ XmlLineInfoProvider x1 = new XmlLineInfoProvider(xmlLineInfo);
+ Assert.IsNotNull(x1, "null XmlLineInfoProvider");
+ IXmlLineInfo i1 = x1.XmlLineInfo;
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderXmlLineInfo END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider ReferenceProvider")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.ReferenceProvider A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void XamlServiceProviderReferenceProvider()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderReferenceProvider START");
+
+ try
+ {
+ INodeImplement i1 = new INodeImplement();
+ ReferenceProvider referenceProvider = new ReferenceProvider(i1);
+ Assert.IsNotNull(referenceProvider, "null ReferenceProvider");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderReferenceProvider END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider FindByName")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.FindByName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlServiceProviderReferenceProviderFindByName()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderReferenceProviderFindByName START");
+
+ try
+ {
+ INodeImplement i1 = new INodeImplement();
+ ReferenceProvider referenceProvider = new ReferenceProvider(i1);
+ Assert.IsNotNull(referenceProvider, "null ReferenceProvider");
+ referenceProvider.FindByName("myName");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderReferenceProviderFindByName END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider NameScope")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.NameScope A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void XamlServiceProviderNameScope()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderNameScope START");
+
+ try
+ {
+ NameScopeProvider n1 = new NameScopeProvider();
+ Assert.IsNotNull(n1, "null NameScopeProvider");
+ INameScope i1 = n1.NameScope;
+ n1.NameScope = i1;
+ Assert.AreEqual(i1, n1.NameScope, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderNameScope END");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("XamlServiceProvider GetNamespacesInScope")]
+ //[Property("SPEC", "Tizen.NUI.XamlServiceProvider.GetNamespacesInScope M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void XamlServiceProviderGetNamespacesInScope()
+ //{
+ // tlog.Debug(tag, $"XamlServiceProviderGetNamespacesInScope START");
+
+ // try
+ // {
+ // XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();
+ // Assert.IsNotNull(xmlNamespaceResolver, "null XmlNamespaceResolver");
+ // XmlNamespaceScope xmlNamespaceScope = new XmlNamespaceScope();
+ // Assert.IsNotNull(xmlNamespaceScope, "null XmlNamespaceScope");
+ // xmlNamespaceResolver.GetNamespacesInScope(xmlNamespaceScope);
+ // }
+ // catch (Exception e)
+ // {
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"XamlServiceProviderGetNamespacesInScope END");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider LookupNamespace")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.LookupNamespace M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlServiceProviderLookupNamespace()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderLookupNamespace START");
+
+ try
+ {
+ XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();
+ Assert.IsNotNull(xmlNamespaceResolver, "null XmlNamespaceResolver");
+ xmlNamespaceResolver.LookupNamespace("myPrefix");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderLookupNamespace END");
+ }
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("XamlServiceProvider LookupPrefix")]
+ //[Property("SPEC", "Tizen.NUI.XamlServiceProvider.LookupPrefix M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void XamlServiceProviderLookupPrefix()
+ //{
+ // tlog.Debug(tag, $"XamlServiceProviderLookupPrefix START");
+
+ // try
+ // {
+ // XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();
+ // Assert.IsNotNull(xmlNamespaceResolver, "null XmlNamespaceResolver");
+ // xmlNamespaceResolver.LookupPrefix("mynameSpaceName");
+ // }
+ // catch (Exception e)
+ // {
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"XamlServiceProviderLookupPrefix END");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlServiceProvider Add")]
+ [Property("SPEC", "Tizen.NUI.XamlServiceProvider.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void XamlServiceProviderXmlNamespaceResolverAdd()
+ {
+ tlog.Debug(tag, $"XamlServiceProviderXmlNamespaceResolverAdd START");
+
+ try
+ {
+ XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();
+ Assert.IsNotNull(xmlNamespaceResolver, "null XmlNamespaceResolver");
+ xmlNamespaceResolver.Add("myPrefix", "myNs");
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlServiceProviderXmlNamespaceResolverAdd END");
+ }
}
}
\ No newline at end of file
[Property("SPEC", "Tizen.NUI.XmlLineInfo.XmlLineInfo C")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
- public void XmlLineInfoConstructor()
+ public void XmlLineInfoConstructor1()
{
- tlog.Debug(tag, $"XmlLineInfoConstructor START");
+ tlog.Debug(tag, $"XmlLineInfoConstructor1 START");
+
+ XmlLineInfo xmlLineInfo1 = new XmlLineInfo();
+ Assert.IsNotNull(xmlLineInfo1, "null XmlLineInfo");
+ Assert.IsInstanceOf<XmlLineInfo>(xmlLineInfo1, "Should return XmlLineInfo instance.");
+ tlog.Debug(tag, $"XmlLineInfoConstructor1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XmlLineInfo XmlLineInfo")]
+ [Property("SPEC", "Tizen.NUI.XmlLineInfo.XmlLineInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void XmlLineInfoConstructor2()
+ {
+ tlog.Debug(tag, $"XmlLineInfoConstructor2 START");
var testingTarget = new XmlLineInfo(10, 5);
Assert.IsNotNull(testingTarget, "null XmlLineInfo");
Assert.IsInstanceOf<XmlLineInfo>(testingTarget, "Should return XmlLineInfo instance.");
- tlog.Debug(tag, $"XmlLineInfoConstructor END");
+ tlog.Debug(tag, $"XmlLineInfoConstructor2 END");
}
[Test]
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public class FocusEffect
+ {
+ public FocusEffect() { }
+
+ public static readonly BindableProperty FocusableProperty = BindableProperty.CreateAttached("Focusable", typeof(bool), typeof(FocusEffect), false);
+
+ public static bool GetFocusable(View view)
+ {
+ return (bool)view.GetValue(FocusableProperty);
+ }
+
+ public static void SetFocusable(View view, bool value)
+ {
+ view.SetValue(FocusableProperty, value);
+ }
+ }
+
+ public class MyView : View
+ {
+ public MyView() { }
+
+ public string[] Array { get; set; }
+ }
+
+ public partial class BaseXamlSample : View
+ {
+ public BaseXamlSample()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(BaseXamlSample));
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<Layer x:Class="Tizen.NUI.Layer"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+ <View x:Name="view1" BackgroundColor="Red" SizeWidth="100" SizeHeight="100" Sensitive="true" />
+</Layer>
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public partial class BaseXamlSample2 : Layer
+ {
+ public BaseXamlSample2()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(BaseXamlSample2));
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public partial class BaseXamlSample3 : Layer
+ {
+ public BaseXamlSample3()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(BaseXamlSample3));
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public class FloatToBoolConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return (float)value != 0;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return (bool)value ? 1 : 0;
+ }
+ }
+
+ public class BoolToObjectConverter<T> : IValueConverter
+ {
+ public T TrueObject { set; get; }
+
+ public T FalseObject { set; get; }
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return (bool)value ? TrueObject : FalseObject;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return ((T)value).Equals(TrueObject);
+ }
+ }
+
+ public class FloatToIntConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return (int)Math.Round((float)value * GetParameter(parameter));
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return (int)value / GetParameter(parameter);
+ }
+
+ float GetParameter(object parameter)
+ {
+ if (parameter is float)
+ return (float)parameter;
+
+ else if (parameter is int)
+ return (int)parameter;
+
+ else if (parameter is string)
+ return float.Parse((string)parameter);
+
+ return 1;
+ }
+ }
+
+ public class RgbColorViewModel : INotifyPropertyChanged
+ {
+ Color color;
+ string name;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public float Red
+ {
+ set
+ {
+ if (color.R != value)
+ {
+ Color = new Color(value, color.G, color.B, 1.0f);
+ }
+ }
+ get
+ {
+ return color.R;
+ }
+ }
+
+
+ public Color Color
+ {
+ set
+ {
+ if (color != value)
+ {
+ color = value;
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Red"));
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Color"));
+
+ Name = "Red";
+ }
+ }
+ get
+ {
+ return color;
+ }
+ }
+
+ public string Name
+ {
+ private set
+ {
+ if (name != value)
+ {
+ name = value;
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Name"));
+ }
+ }
+ get
+ {
+ return name;
+ }
+ }
+ }
+
+ public partial class BindingSample : View
+ {
+ public BindingSample()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(BindingSample));
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.Devel.Tests.ClockView"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+ <TextLabel Text="{Binding DateTime, Mode=TwoWay, StringFormat='{0:T}'}" PositionY="50" >
+ <TextLabel.BindingContext>
+ <l:ClockViewModel />
+ </TextLabel.BindingContext>
+ </TextLabel>
+
+</View>
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+
+[assembly: global::Tizen.NUI.Xaml.XamlResourceIdAttribute("Tizen.NUI.Devel.Tests.testcase.public.Xaml.TotalSample.ClockView.xaml", "testcase.public.Xaml.TotalSample.ClockView.xaml", typeof(global::Tizen.NUI.Devel.Tests.ClockView))]
+
+namespace Tizen.NUI.Devel.Tests
+{
+ class ClockViewModel : INotifyPropertyChanged
+ {
+ DateTime dateTime;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public ClockViewModel()
+ {
+ this.DateTime = DateTime.Now;
+
+ //Device.StartTimer(TimeSpan.FromSeconds(1), () =>
+ //{
+ // this.DateTime = DateTime.Now;
+ // return true;
+ //});
+ }
+
+ public DateTime DateTime
+ {
+ set
+ {
+ if (dateTime != value)
+ {
+ dateTime = value;
+
+ if (PropertyChanged != null)
+ {
+ PropertyChanged(this, new PropertyChangedEventArgs("DateTime"));
+ }
+ }
+ }
+ get
+ {
+ return dateTime;
+ }
+ }
+ }
+
+ [Tizen.NUI.Xaml.XamlFilePathAttribute("testcase\\public\\Xaml\\TotalSample\\ClockView.xaml")]
+ [Tizen.NUI.Xaml.XamlCompilationAttribute(global::Tizen.NUI.Xaml.XamlCompilationOptions.Compile)]
+ public partial class ClockView : View
+ {
+
+ public ClockView()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(ClockView));
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.Devel.Tests.HslColorScrollView"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+
+ <View x:Name="view" BackgroundColor="{Binding Color}" Size2D="440,400" Position2D="20,10" >
+ <View.BindingContext>
+ <l:HslViewModel x:Name="hsl" Color="Red" />
+ </View.BindingContext>
+ </View>
+
+ <TextLabel BindingContext="{x:Reference hsl}" Text="{Binding Hue, StringFormat='Hue = {0:F2}'}"
+ Position2D="20,480" HorizontalAlignment="Center" VerticalAlignment="Center" />
+
+ <TextLabel BindingContext="{x:Reference hsl}" Text="{Binding Saturation, StringFormat='Saturation = {0:F2}'}"
+ Position2D="20,590" HorizontalAlignment="Center" VerticalAlignment="Center" />
+
+ <TextLabel BindingContext="{x:Reference hsl}" Text="{Binding Luminosity, StringFormat='Luminosity = {0:F2}'}"
+ Position2D="20,690" HorizontalAlignment="Center" VerticalAlignment="Center" />
+
+</View>
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+
+[assembly: global::Tizen.NUI.Xaml.XamlResourceIdAttribute("Tizen.NUI.Devel.Tests.testcase.public.Xaml.TotalSample.HslColorScrollView.xaml", "testcase.public.Xaml.TotalSample.HslColorScrollView.xaml", typeof(global::Tizen.NUI.Devel.Tests.HslColorScrollView))]
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public class HslViewModel : INotifyPropertyChanged
+ {
+ float hue, saturation, luminosity;
+ Color color;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public float Hue
+ {
+ set
+ {
+ if (hue != value)
+ {
+ hue = value;
+ OnPropertyChanged("Hue");
+ SetNewColor();
+ }
+ }
+ get
+ {
+ return hue;
+ }
+ }
+
+ public float Saturation
+ {
+ set
+ {
+ if (saturation != value)
+ {
+ saturation = value;
+ OnPropertyChanged("Saturation");
+ SetNewColor();
+ }
+ }
+ get
+ {
+ return saturation;
+ }
+ }
+
+ public float Luminosity
+ {
+ set
+ {
+ if (luminosity != value)
+ {
+ luminosity = value;
+ OnPropertyChanged("Luminosity");
+ SetNewColor();
+ }
+ }
+ get
+ {
+ return luminosity;
+ }
+ }
+
+ public Color Color
+ {
+ set
+ {
+ if (color != value)
+ {
+ color = value;
+ OnPropertyChanged("Color");
+
+ Hue = value.R;
+ Saturation = value.G;
+ Luminosity = value.B;
+ }
+ }
+ get
+ {
+ return color;
+ }
+ }
+
+ void SetNewColor()
+ {
+ Color = new Color(Hue, Saturation, Luminosity, 1.0f);
+ }
+
+ protected virtual void OnPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ [Tizen.NUI.Xaml.XamlFilePathAttribute("testcase\\public\\Xaml\\TotalSample\\HslColorScrollView.xaml")]
+ [Tizen.NUI.Xaml.XamlCompilationAttribute(global::Tizen.NUI.Xaml.XamlCompilationOptions.Compile)]
+ public partial class HslColorScrollView : View
+ {
+
+ public HslColorScrollView()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(HslColorScrollView));
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Text;
+using System.Windows.Input;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public class NameModel
+ {
+ string userName;
+ string companyName;
+
+ public string UserName
+ {
+ get
+ {
+ return userName;
+ }
+ set
+ {
+ userName = value;
+ }
+ }
+
+ public string CompanyName
+ {
+ get
+ {
+ return companyName;
+ }
+ set
+ {
+ companyName = value;
+ }
+ }
+ }
+
+ public class NameViewModel : INotifyPropertyChanged
+ {
+ public NameViewModel()
+ {
+ userName = new NameModel()
+ {
+ UserName = "Adun",
+ CompanyName = "Samsung"
+ };
+ }
+
+ NameModel userName;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public string UserName
+ {
+ get
+ {
+ return userName.UserName;
+ }
+ set
+ {
+ userName.UserName = value;
+ RaisePropertyChanged("UserName");
+ }
+ }
+
+ public string CompanyName
+ {
+ get
+ {
+ return userName.CompanyName;
+ }
+ set
+ {
+ userName.CompanyName = value;
+ }
+ }
+
+ private void RaisePropertyChanged(string propertyName)
+ {
+ PropertyChangedEventHandler handler = PropertyChanged;
+ if (null != handler)
+ {
+ handler(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ void UpdateNameExecute()
+ {
+ UserName = "Xiaohui Fang";
+ }
+
+ bool CanUpdateNameExecute()
+ {
+ return true;
+ }
+
+ public ICommand UpdateName { get { return new Command(UpdateNameExecute, CanUpdateNameExecute); } }
+ }
+
+ //public class RelayCommand : ICommand
+ //{
+ // readonly Func<Boolean> _canExecute;
+ // readonly Action _execute;
+
+ // public RelayCommand(Action execute)
+ // : this(execute, null)
+ // {
+ // }
+
+ // public RelayCommand(Action execute, Func<Boolean> canExecute)
+ // {
+ // if (execute == null)
+ // throw new ArgumentNullException("execute");
+
+ // _execute = execute;
+ // _canExecute = canExecute;
+ // }
+
+ // public event EventHandler CanExecuteChanged
+ // {
+ // add
+ // {
+ // if (_canExecute != null)
+ // {
+ // //CommandManager.RequerySuggested += value;
+ // }
+ // }
+ // remove
+ // {
+ // if (_canExecute != null)
+ // {
+ // //CommandManager.RequerySuggested -= value;
+ // }
+ // }
+ // }
+
+ // [DebuggerStepThrough]
+ // public bool CanExecute(object parameter)
+ // {
+ // return _canExecute == null ? true : _canExecute();
+ // }
+
+ // public void Execute(object parameter)
+ // {
+ // _execute();
+ // }
+ //}
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.Devel.Tests.StaticDateTimeView"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+ <View Position2D="50,50" Size2D="380, 500" BackgroundColor="Red">
+ <TextLabel BindingContext="{x:Static sys:DateTime.Now}" Text="{Binding Year, StringFormat='The year is {0}'}" PositionY="0" />
+ <TextLabel BindingContext="{x:Static sys:DateTime.Now}" Text="{Binding StringFormat='The month is {0:MMMM}'}" PositionY="50" />
+ <TextLabel BindingContext="{x:Static sys:DateTime.Now}" Text="{Binding Day, StringFormat='The day is {0}'}" PositionY="100" />
+ <TextLabel BindingContext="{x:Static sys:DateTime.Now}" Text="{Binding StringFormat='The time is {0:T}'}" PositionY="150" />
+ </View>
+</View>
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+
+[assembly: global::Tizen.NUI.Xaml.XamlResourceIdAttribute("Tizen.NUI.Devel.Tests.testcase.public.Xaml.TotalSample.StaticDateTimeView.xaml", "testcase.public.Xaml.TotalSample.StaticDateTimeView.xaml", typeof(global::Tizen.NUI.Devel.Tests.StaticDateTimeView))]
+
+namespace Tizen.NUI.Devel.Tests
+{
+ [Tizen.NUI.Xaml.XamlFilePathAttribute("testcase\\public\\Xaml\\TotalSample\\StaticDateTimeView.xaml")]
+ [Tizen.NUI.Xaml.XamlCompilationAttribute(global::Tizen.NUI.Xaml.XamlCompilationOptions.Compile)]
+ public partial class StaticDateTimeView : View
+ {
+ public StaticDateTimeView()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(StaticDateTimeView));
+ }
+ }
+}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<l:UIElement x:Class="Tizen.NUI.Devel.Tests.TotalSample"
- xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
- xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
-
- <l:UIElement.XamlResources>
- <ResourceDictionary>
- <l:FloatToStringConverter x:Key="floatToStringConverter" />
- <x:String x:Key="positionKey">
- 200, 200
- </x:String>
- </ResourceDictionary>
- </l:UIElement.XamlResources>
-
-
- <l:UIElement x:Name="t1" CharP="c" StringP="{Binding Path=Size.Width, Converter={StaticResource floatToStringConverter}, StringFormat='{0:N0}'}" BindingContext="{x:Reference t2}" />
- <l:UIElement x:Name="t2" Size="300, 200" Position="{DynamicResource positionKey}" IntP="123" UIntP="123" LongP="111" ULongP="111" FloatP="1.0" DoubleP="1.0" />
- <l:UIElement x:Name="t3" StringP="{Binding Source={x:Reference t2}, Path=Size.Height, Converter={StaticResource floatToStringConverter}, StringFormat='{0:N0}'}" />
-
- <l:UIElement CustomBindableProperty="View.Position">
- </l:UIElement>
-
- <!--Cover TypeConversionExtensions.ConvertTo-->
- <l:UIElement IntP="123" UIntP="123" LongP="111" ULongP="111" FloatP="1.0" DoubleP="1.0" />
-
- <!--Cover CreateLanguagePrimitive-->
- <l:UIElement>
- <x:Arguments>
- <x:Int32>1</x:Int32>
- </x:Arguments>
- <l:UIElement.Size>
- <Null />
- </l:UIElement.Size>
- </l:UIElement>
-
- <!--<l:UIElement>
- <x:Arguments>
- <x:Array Type="x:Int32">
- <x:Int32>1</x:Int32>
- <x:Int32>2</x:Int32>
- </x:Array>
- </x:Arguments>
- </l:UIElement>-->
-
- <l:UIElement>
- <x:Arguments>
- <l:UIElement-TestEnum>V1</l:UIElement-TestEnum>
- </x:Arguments>
- </l:UIElement>
-
- <l:UIElement>
- <x:Arguments>
- <l:UIElement-TestNestType />
- </x:Arguments>
- <l:UIElement.CustomList>
- <x:Int32> 1000 </x:Int32>
- </l:UIElement.CustomList>
- </l:UIElement>
-
- <l:UIElement>
- <x:Arguments>
- <l:UIElement />
- </x:Arguments>
- </l:UIElement>
-
- <l:UIElement x:FactoryMethod="FactoryMethod">
- <x:Arguments>
- <x:Int32>1</x:Int32>
- <x:String>str</x:String>
- <x:Single>2.0</x:Single>
- </x:Arguments>
- </l:UIElement>
-</l:UIElement>
*
*/
using System;
+using System.Collections.Generic;
using System.Globalization;
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
using Tizen.NUI.Binding;
using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+//using static Tizen.NUI.Xaml.VisualStateManager;
namespace Tizen.NUI.Devel.Tests
{
public partial class TotalSample : UIElement
{
- public TotalSample()
+ private void LoadEXaml()
{
- InitializeComponent();
+ eXamlData = global::Tizen.NUI.EXaml.EXamlExtensions.LoadFromEXamlByRelativePath(this, @"examl/Tizen.NUI.Devel.Tests.TotalSample.examl");
+ t1 = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<global::Tizen.NUI.Devel.Tests.UIElement>(this, "t1");
+ t2 = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<global::Tizen.NUI.Devel.Tests.UIElement>(this, "t2");
+ t3 = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<global::Tizen.NUI.Devel.Tests.UIElement>(this, "t3");
+ }
+
+ private void UIElementEvent(object sender, EventArgs e)
+ {
+ }
+
+ private void StaticUIElementEvent(object sender, EventArgs e)
+ {
+ }
+
+ private void LoadXaml()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(TotalSample));
+ }
+
+ public TotalSample(bool examl = false)
+ {
+ if (examl)
+ {
+ LoadEXaml();
+ global::Tizen.NUI.EXaml.EXamlExtensions.RemoveEventsInXaml(eXamlData);
+ }
+ else
+ {
+ InitializeComponent();
+ }
}
}
}
\ No newline at end of file
// </auto-generated>
//------------------------------------------------------------------------------
-[assembly: global::Tizen.NUI.Xaml.XamlResourceIdAttribute("Tizen.NUI.Devel.Tests.testcase.public.Xaml.TotalSample.TotalSample.xaml", "testcase/public/Xaml/TotalSample/TotalSample.xaml", typeof(global::Tizen.NUI.Devel.Tests.TotalSample))]
+using Tizen.NUI.Xaml;
+[assembly: global::Tizen.NUI.Xaml.XamlResourceIdAttribute("Tizen.NUI.Devel.Tests.res.layout.TotalSample.xaml", "res/layout/TotalSample.xaml", typeof(global::Tizen.NUI.Devel.Tests.TotalSample))]
-namespace Tizen.NUI.Devel.Tests {
-
-
- [Tizen.NUI.Xaml.XamlFilePathAttribute("testcase\\public\\Xaml\\TotalSample\\TotalSample.xaml")]
+namespace Tizen.NUI.Devel.Tests
+{
+
+
+ [Tizen.NUI.Xaml.XamlFilePathAttribute("res\\layout\\TotalSample.xaml")]
[Tizen.NUI.Xaml.XamlCompilationAttribute(global::Tizen.NUI.Xaml.XamlCompilationOptions.Compile)]
- public partial class TotalSample : global::Tizen.NUI.Devel.Tests.UIElement {
-
+ public partial class TotalSample : global::Tizen.NUI.Devel.Tests.UIElement
+ {
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
public global::Tizen.NUI.Devel.Tests.UIElement t1;
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
public global::Tizen.NUI.Devel.Tests.UIElement t2;
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
public global::Tizen.NUI.Devel.Tests.UIElement t3;
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
private object eXamlData;
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
- private void InitializeComponent() {
+ private void InitializeComponent()
+ {
//eXamlData = global::Tizen.NUI.EXaml.EXamlExtensions.LoadFromEXamlByRelativePath(this, GetEXamlPath());
global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(TotalSample));
t1 = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<global::Tizen.NUI.Devel.Tests.UIElement>(this, "t1");
t2 = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<global::Tizen.NUI.Devel.Tests.UIElement>(this, "t2");
t3 = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<global::Tizen.NUI.Devel.Tests.UIElement>(this, "t3");
}
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
- private string GetEXamlPath() {
+ private string GetEXamlPath()
+ {
return default(string);
}
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
- private void RemoveEventsInXaml() {
- //global::Tizen.NUI.EXaml.EXamlExtensions.RemoveEventsInXaml(eXamlData);
+ private void RemoveEventsInXaml()
+ {
+ global::Tizen.NUI.EXaml.EXamlExtensions.RemoveEventsInXaml(eXamlData);
}
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Tizen.NUI.Xaml.Build.Tasks.XamlG", "1.0.6.0")]
- private void ExitXaml() {
- //RemoveEventsInXaml();
- //global::Tizen.NUI.EXaml.EXamlExtensions.DisposeXamlElements(this);
+ private void ExitXaml()
+ {
+ RemoveEventsInXaml();
+ global::Tizen.NUI.EXaml.EXamlExtensions.DisposeXamlElements(this);
}
}
}
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Input;
using Tizen.NUI.BaseComponents;
using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
namespace Tizen.NUI.Devel.Tests
{
- public class UIElement : View, IResourcesProvider
+ public class GenericTemple<T>
{
- public static readonly BindableProperty IntPProperty = BindableProperty.Create(nameof(IntP), typeof(int), typeof(UIElement), 0, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
- {
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- return 0;
- }));
- public static readonly BindableProperty StringPProperty = BindableProperty.Create(nameof(StringP), typeof(string), typeof(UIElement), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
- {
- (bindable as UIElement).stringP = newValue as string;
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- return (bindable as UIElement).stringP;
- }));
+ }
- public static readonly BindableProperty FloatPProperty = BindableProperty.Create(nameof(FloatP), typeof(float), typeof(UIElement), 0.0f, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ public class CustomList : List<string>
+ {
+ public class ParamType
{
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ public static implicit operator ParamType(int i)
+ {
+ var ret = new ParamType();
+ ret.value = i;
+ return ret;
+ }
+
+ private int value;
+
+ public override string ToString()
+ {
+ return value.ToString();
+ }
+ }
+
+ public static implicit operator CustomList(ParamType p)
{
- return 0.0f;
- }));
+ return new CustomList() { p.ToString() };
+ }
+ }
+ [ContentProperty("VisualStateGroup")]
+ public partial class UIElement : View, IResourcesProvider
+ {
public UIElement()
{
}
+ public CustomList CustomList
+ {
+ get;
+ set;
+ } = new CustomList();
+
+ public List<string> StrList
+ {
+ get;
+ set;
+ }
+
+ public View Child
+ {
+ get;
+ set;
+ }
+
+ private static View staticChild;
+ public static View StaticChild
+ {
+ get
+ {
+ if (null == staticChild)
+ {
+ staticChild = new View();
+ }
+ return staticChild;
+ }
+ set
+ {
+ staticChild?.Dispose();
+ staticChild = value;
+ }
+ }
+
public class TestNestType
{
public TestNestType(int p = 0)
}
+ public UIElement([Parameter("CharP")]char c)
+ {
+
+ }
+
+ public UIElement(List<object> p)
+ {
+
+ }
+
public static UIElement FactoryMethod(int p1, string p2, float p3)
{
return new UIElement();
}
+ public static UIElement FactoryMethodWithoutParams()
+ {
+ return new UIElement();
+ }
+
public int IntP
{
get
}
}
+ public BindableProperty CustomBindableProperty
+ {
+ get;
+ set;
+ }
+
private string stringP;
public string StringP
{
SetValue(FloatPProperty, value);
}
}
+
+ public event EventHandler<EventArgs> Event;
+
+ public ICommand Command
+ {
+ get { return (ICommand)GetValue(CommandProperty); }
+ set { SetValue(CommandProperty, value); }
+ }
+
+
+ public object CommandParameter
+ {
+ get { return GetValue(CommandParameterProperty); }
+ set { SetValue(CommandParameterProperty, value); }
+ }
+
+ internal bool IsFocused { get; set; } = false;
+
+ internal void CommandCanExecuteChanged(object sender, EventArgs eventArgs)
+ {
+ ICommand cmd = Command;
+ if (cmd != null)
+ cmd.CanExecute(CommandParameter);
+ }
+
+ internal void OnCommandChanged()
+ {
+ if (Command != null)
+ {
+ Command.CanExecuteChanged += CommandCanExecuteChanged;
+ CommandCanExecuteChanged(this, EventArgs.Empty);
+ }
+ }
}
}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public partial class UIElement
+ {
+ public static readonly BindableProperty IntPProperty = BindableProperty.Create(nameof(IntP), typeof(int), typeof(UIElement), 0, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return 0;
+ }));
+
+ public static readonly BindableProperty LongPProperty = BindableProperty.Create("LongP", typeof(long), typeof(UIElement), 0L, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return 0;
+ }));
+
+ public static readonly BindableProperty UIntPProperty = BindableProperty.Create("UIntP", typeof(uint), typeof(UIElement), 0u, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return 0;
+ }));
+
+ public static readonly BindableProperty ULongPProperty = BindableProperty.Create("ULongP", typeof(ulong), typeof(UIElement), 0uL, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return 0;
+ }));
+
+ public static readonly BindableProperty StringPProperty = BindableProperty.Create(nameof(StringP), typeof(string), typeof(UIElement), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ (bindable as UIElement).stringP = newValue as string;
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return (bindable as UIElement).stringP;
+ }));
+
+ public static readonly BindableProperty FloatPProperty = BindableProperty.Create("FloatP", typeof(float), typeof(UIElement), 0.0f, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return 0.0f;
+ }));
+
+ public static readonly BindableProperty DoublePProperty = BindableProperty.Create("Double", typeof(double), typeof(UIElement), 0.0, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return 0.0f;
+ }));
+
+ public static readonly BindableProperty ViewPProperty = BindableProperty.Create("ViewP", typeof(View), typeof(UIElement), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ return new View();
+ }));
+
+ public static readonly BindableProperty CommandProperty = BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(UIElement), null, propertyChanged: (bo, o, n) => ((UIElement)bo).OnCommandChanged());
+
+ public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create(nameof(CommandParameter), typeof(object), typeof(UIElement), null,
+ propertyChanged: (bindable, oldvalue, newvalue) => ((UIElement)bindable).CommandCanExecuteChanged(bindable, EventArgs.Empty));
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Components;
+using Tizen.NUI.Xaml;
+//using static Tizen.NUI.Xaml.VisualStateManager;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ public partial class XamlStyleSample : View
+ {
+ public XamlStyleSample()
+ {
+ global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(XamlStyleSample));
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Interactivity/Behavior")]
+ internal class PublicBehaviorTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ internal class MyBehavior<T> : Behavior<T> where T : BindableObject
+ {
+ public MyBehavior(){}
+
+ public void AttachedTo(BindableObject bindable)
+ {
+ base.OnAttachedTo(bindable);
+ }
+
+ public void DetachingFrom(BindableObject bindable)
+ {
+ base.OnDetachingFrom(bindable);
+ }
+
+ public Type GetAssociatedType()
+ {
+ return AssociatedType;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Behavior Behavior ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Behavior<T>.Behavior C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void BehaviorConstructor()
+ {
+ tlog.Debug(tag, $"BehaviorConstructor START");
+ MyBehavior<View> mb = new MyBehavior<View>();
+ Assert.IsNotNull(mb, "Should not be null");
+ tlog.Debug(tag, $"BehaviorConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Behavior AssociatedType")]
+ [Property("SPEC", "Tizen.NUI.Binding.Behavior.AssociatedType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void AssociatedTypeTest()
+ {
+ tlog.Debug(tag, $"AssociatedTypeTest START");
+ MyBehavior<View> mb = new MyBehavior<View>();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = mb.GetAssociatedType();
+ Assert.IsNotNull(ret, "Should not be null");
+ tlog.Debug(tag, $"AssociatedTypeTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Behavior OnAttachedTo ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Behavior<T>.OnAttachedTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void OnAttachedToTest()
+ {
+ tlog.Debug(tag, $"AssociatedTypeTest START");
+ try
+ {
+ MyBehavior<View> mb = new MyBehavior<View>();
+ Assert.IsNotNull(mb, "Should not be null");
+ mb.AttachedTo(new View());
+ }
+ catch(Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"AssociatedTypeTest END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Behavior OnAttachedTo ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Behavior<T>.OnAttachedTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void OnAttachedToTest2()
+ {
+ tlog.Debug(tag, $"AssociatedTypeTest2 START");
+
+ try
+ {
+ MyBehavior<View> mb = new MyBehavior<View>();
+ Assert.IsNotNull(mb, "Should not be null");
+ mb.AttachedTo(null);
+ }
+ catch(Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+
+ tlog.Debug(tag, $"AssociatedTypeTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Behavior OnDetachingFrom ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Behavior<T>.OnDetachingFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void OnDetachingFromTest()
+ {
+ tlog.Debug(tag, $"OnDetachingFromTest START");
+ try
+ {
+ MyBehavior<View> mb = new MyBehavior<View>();
+ Assert.IsNotNull(mb, "Should not be null");
+ mb.DetachingFrom(new View());
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"OnDetachingFromTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Interactivity/BindingCondition")]
+ internal class PublicBindingConditionTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition BindingCondition ")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.BindingCondition C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void BindingConditionConstructor()
+ {
+ tlog.Debug(tag, $"BindingConditionConstructor START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ tlog.Debug(tag, $"BindingConditionConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.Binding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void BindingTest()
+ {
+ tlog.Debug(tag, $"BindingTest START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = mb.Binding; //null
+ Assert.IsNull(ret, "Should be null");
+ mb.Binding = ret;
+ tlog.Debug(tag, $"BindingTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.Binding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void BindingTest2()
+ {
+ tlog.Debug(tag, $"BindingTest2 START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var b = new Binding.Binding();
+ mb.Binding = b;
+ var ret = mb.Binding; //null
+ Assert.AreEqual(b, ret, "Should be equal");
+
+ tlog.Debug(tag, $"BindingTest2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("BindingCondition Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.Binding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void BindingTest3()
+ {
+ tlog.Debug(tag, $"BindingTest3 START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var b = new Binding.Binding();
+ mb.IsSealed = true;
+ Assert.Throws<InvalidOperationException>(() => mb.Binding = b);
+ tlog.Debug(tag, $"BindingTest3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest()
+ {
+ tlog.Debug(tag, $"ValueTest START");
+ try
+ {
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = mb.Value;
+ Assert.IsNotNull(mb, "Should not be null");
+ mb.Value = ret;
+ }
+ catch(Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"ValueTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest2()
+ {
+ tlog.Debug(tag, $"ValueTest2 START");
+ try
+ {
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = new View();
+ mb.Value = ret;
+ Assert.AreEqual(ret, mb.Value, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"ValueTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest3()
+ {
+ tlog.Debug(tag, $"ValueTest3 START");
+
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = new View();
+ mb.IsSealed = true;
+ Assert.Throws<InvalidOperationException>(() => mb.Value = ret);
+
+ tlog.Debug(tag, $"ValueTest3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition GetState ")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.GetState M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GetStateTest()
+ {
+ tlog.Debug(tag, $"GetStateTest START");
+ try {
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = mb.GetState(new View());
+ Assert.AreEqual(true, ret, "Should be equal");
+ //Assert.Throws<ArgumentNullException>(() => mb.AttachedTo(null));
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+
+ tlog.Debug(tag, $"GetStateTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition SetUp")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.SetUp M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void SetUpTest()
+ {
+ tlog.Debug(tag, $"SetUpTest START");
+ try
+ {
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ mb.SetUp(new View());
+ //Assert.Throws<ArgumentNullException>(() => mb.AttachedTo(null));
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+
+ tlog.Debug(tag, $"SetUpTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingCondition TearDown")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingCondition.TearDown M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void TearDownTest()
+ {
+ tlog.Debug(tag, $"TearDownTest START");
+ try
+ {
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ mb.TearDown(new View());
+ //Assert.Throws<ArgumentNullException>(() => mb.AttachedTo(null));
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+
+ tlog.Debug(tag, $"TearDownTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Interactivity/Condition")]
+ internal class PublicConditionTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Condition Condition ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Condition.Condition C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ConditionConstructor()
+ {
+ tlog.Debug(tag, $"ConditionConstructor START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ tlog.Debug(tag, $"ConditionConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Condition ConditionChanged")]
+ [Property("SPEC", "Tizen.NUI.Binding.Condition.ConditionChanged A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ConditionChangedTest()
+ {
+ tlog.Debug(tag, $"ConditionChangedTest START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = mb.ConditionChanged; //null
+ Assert.IsNull(ret, "Should be null");
+ mb.ConditionChanged = ret;
+ tlog.Debug(tag, $"ConditionChangedTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Condition Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.Condition.ConditionChanged A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ConditionChangedTest2()
+ {
+ tlog.Debug(tag, $"ConditionChangedTest2 START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var b = new Binding.Binding();
+ var ac = (Action<BindableObject, bool, bool>)((bindable, b, c) => throw new Exception());
+ mb.ConditionChanged = ac;
+
+ tlog.Debug(tag, $"ConditionChangedTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Condition IsSealed")]
+ [Property("SPEC", "Tizen.NUI.Binding.Condition.IsSealed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void IsSealedTest()
+ {
+ tlog.Debug(tag, $"IsSealedTest START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ var ret = mb.IsSealed;
+ Assert.AreEqual(false, ret, "Should be equal");
+ mb.IsSealed = ret;
+ tlog.Debug(tag, $"IsSealedTest END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Condition IsSealed")]
+ [Property("SPEC", "Tizen.NUI.Binding.Condition.IsSealed A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void IsSealedTest2()
+ {
+ tlog.Debug(tag, $"IsSealedTest2 START");
+ BindingCondition mb = new BindingCondition();
+ Assert.IsNotNull(mb, "Should not be null");
+ mb.IsSealed = true;
+ Assert.AreEqual(true, mb.IsSealed, "Should be equal");
+ Assert.Throws<InvalidOperationException>(() => mb.IsSealed = false);
+ tlog.Debug(tag, $"IsSealedTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Interactivity/DataTrigger")]
+ internal class PublicDataTriggerTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("DataTrigger DataTrigger ")]
+ [Property("SPEC", "Tizen.NUI.Binding.DataTrigger.DataTrigger C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void DataTriggerConstructor()
+ {
+ tlog.Debug(tag, $"DataTriggerConstructor START");
+ DataTrigger dt = new DataTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ tlog.Debug(tag, $"DataTriggerConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("DataTrigger Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.DataTrigger.Binding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void BindingTest()
+ {
+ tlog.Debug(tag, $"BindingTest START");
+ DataTrigger dt = new DataTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ var ret = dt.Binding; //null
+ Assert.IsNull(ret, "Should be null");
+ dt.Binding = ret;
+ tlog.Debug(tag, $"BindingTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("DataTrigger Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.DataTrigger.Binding A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void BindingTest2()
+ {
+ tlog.Debug(tag, $"BindingTest2 START");
+ DataTrigger dt = new DataTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ var b = new Binding.Binding();
+ dt.Binding = b;
+
+ tlog.Debug(tag, $"BindingTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("DataTrigger Setters")]
+ [Property("SPEC", "Tizen.NUI.Binding.DataTrigger.Setters A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void SettersTest()
+ {
+ tlog.Debug(tag, $"SettersTest START");
+ DataTrigger dt = new DataTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ var ret = dt.Setters;
+ Assert.AreEqual(0, ret.Count, "Should be equal");
+
+ tlog.Debug(tag, $"SettersTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("DataTrigger Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.DataTrigger.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest()
+ {
+ tlog.Debug(tag, $"IsSealedTest2 START");
+ DataTrigger dt = new DataTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ var ret = dt.Value;
+ dt.Value = ret;
+ Assert.AreEqual(ret, dt.Value, "Should be equal");
+ dt.Value = 0;
+ tlog.Debug(tag, $"IsSealedTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Interactivity/EventTrigger")]
+ internal class PublicEventTriggerTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EventTrigger EventTrigger ")]
+ [Property("SPEC", "Tizen.NUI.Binding.EventTrigger.EventTrigger C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void EventTriggerConstructor()
+ {
+ tlog.Debug(tag, $"EventTriggerConstructor START");
+ EventTrigger dt = new EventTrigger();
+ Assert.IsNotNull(dt, "Should not be null");
+ tlog.Debug(tag, $"EventTriggerConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EventTrigger Actions")]
+ [Property("SPEC", "Tizen.NUI.Binding.EventTrigger.Actions A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void ActionsTest()
+ {
+ tlog.Debug(tag, $"ActionsTest START");
+ EventTrigger dt = new EventTrigger();
+ Assert.IsNotNull(dt, "Should not be null");
+ var ret = dt.Actions;
+ Assert.AreEqual(0, ret.Count, "Should be equal");
+
+ tlog.Debug(tag, $"ActionsTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EventTrigger Event")]
+ [Property("SPEC", "Tizen.NUI.Binding.EventTrigger.Event A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void EventTest()
+ {
+ tlog.Debug(tag, $"EventTest START");
+ EventTrigger dt = new EventTrigger();
+ Assert.IsNotNull(dt, "Should not be null");
+ var ret = dt.Event; //null
+ Assert.IsNull(ret, "Should be null");
+ dt.Event = ret;
+ tlog.Debug(tag, $"EventTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EventTrigger Event")]
+ [Property("SPEC", "Tizen.NUI.Binding.EventTrigger.Event A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void EventTest2()
+ {
+ tlog.Debug(tag, $"BindingTest2 START");
+ EventTrigger dt = new EventTrigger();
+ Assert.IsNotNull(dt, "Should not be null");
+ var b = "Clicked";
+ dt.Event = b;
+
+ tlog.Debug(tag, $"BindingTest2 END");
+ }
+
+
+ [Test]
+ [Category("P1")]
+ [Description("EventTrigger OnAttachedTo")]
+ [Property("SPEC", "Tizen.NUI.Binding.EventTrigger.OnAttachedTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void OnAttachedToTest()
+ {
+ tlog.Debug(tag, $"OnAttachedToTest START");
+ try
+ {
+ EventTrigger dt = new EventTrigger();
+ Assert.IsNotNull(dt, "Should not be null");
+ dt.OnAttachedTo(new View());
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"OnAttachedToTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EventTrigger OnDetachingFrom")]
+ [Property("SPEC", "Tizen.NUI.Binding.EventTrigger.OnDetachingFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void OnDetachingFromTest()
+ {
+ tlog.Debug(tag, $"OnDetachingFromTest START");
+ try
+ {
+ EventTrigger dt = new EventTrigger();
+ Assert.IsNotNull(dt, "Should not be null");
+ dt.OnDetachingFrom(new View());
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"OnDetachingFromTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("EventTrigger OnSeal")]
+ [Property("SPEC", "Tizen.NUI.Binding.EventTrigger.OnSeal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void OnSealTest()
+ {
+ tlog.Debug(tag, $"OnSealTest START");
+ try
+ {
+ EventTrigger dt = new EventTrigger();
+ Assert.IsNotNull(dt, "Should not be null");
+ dt.OnSeal();
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"OnSealTest END");
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Interactivity/MultiTrigger")]
+ internal class PublicMultiTriggerTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MultiTrigger MultiTrigger ")]
+ [Property("SPEC", "Tizen.NUI.Binding.MultiTrigger.MultiTrigger C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void MultiTriggerConstructor()
+ {
+ tlog.Debug(tag, $"MultiTriggerConstructor START");
+ MultiTrigger dt = new MultiTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ tlog.Debug(tag, $"MultiTriggerConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MultiTrigger Conditions")]
+ [Property("SPEC", "Tizen.NUI.Binding.MultiTrigger.Conditions A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void ConditionsTest()
+ {
+ tlog.Debug(tag, $"ConditionsTest START");
+ MultiTrigger dt = new MultiTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ var ret = dt.Conditions;
+ Assert.AreEqual(0, ret.Count, "Should be equal");
+
+ tlog.Debug(tag, $"ConditionsTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("MultiTrigger Setters")]
+ [Property("SPEC", "Tizen.NUI.Binding.MultiTrigger.Setters A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void SettersTest()
+ {
+ tlog.Debug(tag, $"SettersTest START");
+ MultiTrigger dt = new MultiTrigger(typeof(View));
+ Assert.IsNotNull(dt, "Should not be null");
+ var ret = dt.Setters; //null
+ Assert.AreEqual(0, ret.Count, "Should be equal");
+ tlog.Debug(tag, $"SettersTest END");
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Interactivity/XamlPropertyCondition")]
+ internal class PublicXamlPropertyConditionTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition XamlPropertyCondition ")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.XamlPropertyCondition C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void XamlPropertyConditionConstructor()
+ {
+ tlog.Debug(tag, $"XamlPropertyConditionConstructor START");
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ tlog.Debug(tag, $"XamlPropertyConditionConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition Property")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.Property A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void PropertyTest()
+ {
+ tlog.Debug(tag, $"PropertyTest START");
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ var ret = xp.Property; //null
+ Assert.IsNull(ret, "Should be null");
+ xp.Property = ret;
+ tlog.Debug(tag, $"PropertyTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition Property")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.Property A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void PropertyTest2()
+ {
+ tlog.Debug(tag, $"PropertyTest2 START");
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ var b = View.FocusableProperty;
+ xp.Property = b;
+ var ret = xp.Property; //null
+ Assert.AreEqual(b, ret, "Should be equal");
+
+ tlog.Debug(tag, $"PropertyTest2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("XamlPropertyCondition Property")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.Property A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void PropertyTest3()
+ {
+ tlog.Debug(tag, $"PropertyTest3 START");
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ var b = View.FocusableProperty;
+ xp.IsSealed = true;
+ Assert.Throws<InvalidOperationException>(() => xp.Property = b);
+ tlog.Debug(tag, $"PropertyTest3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest()
+ {
+ tlog.Debug(tag, $"ValueTest START");
+ try
+ {
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ var ret = xp.Value;
+ Assert.IsNotNull(xp, "Should not be null");
+ xp.Value = ret;
+ }
+ catch(Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"ValueTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest2()
+ {
+ tlog.Debug(tag, $"ValueTest2 START");
+ try
+ {
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ xp.Value = true;
+ Assert.AreEqual(true, xp.Value, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+ tlog.Debug(tag, $"ValueTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest3()
+ {
+ tlog.Debug(tag, $"ValueTest3 START");
+
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ xp.IsSealed = true;
+ Assert.Throws<InvalidOperationException>(() => xp.Value = true);
+
+ tlog.Debug(tag, $"ValueTest3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition GetState ")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.GetState M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void GetStateTest()
+ {
+ tlog.Debug(tag, $"GetStateTest START");
+ try {
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ var ret = xp.GetState(new View());
+ Assert.AreEqual(false, ret, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+
+ tlog.Debug(tag, $"GetStateTest END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("XamlPropertyCondition SetUp")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.SetUp M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void SetUpTest()
+ {
+ tlog.Debug(tag, $"SetUpTest START");
+ try
+ {
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ xp.Value = true;
+ xp.SetUp(new View());
+ }
+ catch (Exception e)
+ {
+ Assert.True(true, "Should thow exception: " + e.Message);
+ }
+
+ tlog.Debug(tag, $"SetUpTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlPropertyCondition TearDown")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlPropertyCondition.TearDown M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void TearDownTest()
+ {
+ tlog.Debug(tag, $"TearDownTest START");
+ try
+ {
+ XamlPropertyCondition xp = new XamlPropertyCondition();
+ Assert.IsNotNull(xp, "Should not be null");
+ xp.TearDown(new View());
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Should not thow exception: " + e.Message);
+ }
+
+ tlog.Debug(tag, $"TearDownTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Internals/NameScope")]
+ internal class PublicNameScopeTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("NameScope SetNameScope ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Internals.NameScope.SetNameScope M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void SetNameScopeTest()
+ {
+ tlog.Debug(tag, $"SetNameScopeTest START");
+ Assert.Throws<ArgumentNullException>(() => NameScope.SetNameScope(null, null));
+ tlog.Debug(tag, $"SetNameScopeTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/BindablePropertyConverter")]
+ internal class PublicBindablePropertyConverterTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindablePropertyConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindablePropertyConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest START");
+ try
+ {
+ BindablePropertyConverter t2 = new BindablePropertyConverter();
+ Assert.IsNotNull(t2, "null BindablePropertyConverter");
+ var b1 = t2.ConvertFromInvariantString("");
+ Assert.IsNull(b1, "null Binding");
+ var b2 = t2.ConvertFromInvariantString("A:B");
+ Assert.IsNull(b2, "null Binding");
+ var b3 = t2.ConvertFromInvariantString("A.B.C");
+ Assert.IsNull(b3, "null Binding");
+ var b4 = t2.ConvertFromInvariantString("A.B.C");
+ Assert.IsNull(b4, "null Binding");
+ var b5 = t2.ConvertFromInvariantString("GaussianBlurView.BlurStrength");
+ Assert.IsNotNull(b5, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindablePropertyConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindablePropertyConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ public void ConvertFromInvariantStringTest2()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 START");
+
+ BindablePropertyConverter t2 = new BindablePropertyConverter();
+ Assert.Throws<XamlParseException>(() => t2.ConvertFromInvariantString("GaussianBlurView.BlurStrengthA"));
+
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/BindablePropertyKey")]
+ internal class PublicBindablePropertyKeyTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindablePropertyKey BindablePropertyKey")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindablePropertyKey.BindablePropertyKey C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void BindablePropertyKeyConstructor()
+ {
+ tlog.Debug(tag, $"BindablePropertyKeyConstructor START");
+
+ try
+ {
+ BindablePropertyKey t2 = new BindablePropertyKey(View.NameProperty);
+ Assert.IsNotNull(t2, "null BindablePropertyKey");
+ Assert.IsInstanceOf<BindablePropertyKey>(t2, "Should return BindablePropertyKey instance.");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"BindablePropertyKeyConstructor END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("BindablePropertyKey BindablePropertyKey")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindablePropertyKey.BindablePropertyKey C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void BindablePropertyKeyConstructor2()
+ {
+ tlog.Debug(tag, $"BindablePropertyKeyConstructor2 START");
+ Assert.Throws<ArgumentNullException>(() => new BindablePropertyKey(null));
+ tlog.Debug(tag, $"BindablePropertyKeyConstructor2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindablePropertyKey BindableProperty")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindablePropertyKey.BindableProperty A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void BindablePropertyTest1()
+ {
+ tlog.Debug(tag, $"BindablePropertyTest1 START");
+ try
+ {
+ BindablePropertyKey t2 = new BindablePropertyKey(View.NameProperty);
+ Assert.IsNotNull(t2, "null BindablePropertyKey");
+ Assert.AreEqual(View.NameProperty, t2.BindableProperty, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"BindablePropertyTest1 END");
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Binding")]
+ internal class PublicBindingTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Binding Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Binding C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void BindingConstructor()
+ {
+ tlog.Debug(tag, $"BindingConstructor START");
+ Binding.Binding t2 = new Binding.Binding();
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+ tlog.Debug(tag, $"BindingConstructor END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Binding Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Binding C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "string,BindingMode,IValueConverter,object,string,object")]
+ public void BindingConstructor2()
+ {
+ tlog.Debug(tag, $"BindingConstructor2 START");
+ Assert.Throws<ArgumentNullException>(() => new Binding.Binding(null));
+
+ tlog.Debug(tag, $"BindingConstructor2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Binding Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Binding C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "string,BindingMode,IValueConverter,object,string,object")]
+ public void BindingConstructor3()
+ {
+ tlog.Debug(tag, $"BindingConstructor3 START");
+ Assert.Throws<ArgumentException>(() => new Binding.Binding(""));
+
+ tlog.Debug(tag, $"BindingConstructor3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Binding Binding")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Converter A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ConverterTest()
+ {
+ tlog.Debug(tag, $"ConverterTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+ var ret = t2.Converter;
+ Assert.IsNull(ret, "null Converter");
+
+ tlog.Debug(tag, $"ConverterTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Binding ConverterParameter")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.ConverterParameter A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ConverterParameterTest()
+ {
+ tlog.Debug(tag, $"ConverterParameterTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+
+ var ret = t2.ConverterParameter;
+ Assert.IsNull(ret, "null ConverterParameter");
+
+ tlog.Debug(tag, $"ConverterParameterTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Binding Path")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Path A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void PathTest()
+ {
+ tlog.Debug(tag, $"PathTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+
+ var ret = t2.Path;
+ Assert.AreEqual("Test", ret, "null Path");
+
+ tlog.Debug(tag, $"PathTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Binding ConverterParameter")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Source A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void SourceTest()
+ {
+ tlog.Debug(tag, $"SourceTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+
+ var ret = t2.Source;
+ Assert.IsNull(ret, "null Source");
+
+ tlog.Debug(tag, $"SourceTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Binding Apply")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Apply M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ApplyTest()
+ {
+ tlog.Debug(tag, $"ApplyTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ t2.Apply(false);
+ Assert.True(true, "Should go here"); ;
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ApplyTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Binding Apply")]
+ [Property("SPEC", "Tizen.NUI.Binding.Binding.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void CloneTest()
+ {
+ tlog.Debug(tag, $"CloneTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Binding.Binding c = t2.Clone() as Binding.Binding;
+ Assert.IsNotNull(c, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"CloneTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/BindingBase")]
+ internal class PublicBindingBaseTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase Mode")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.Mode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ModeTest()
+ {
+ tlog.Debug(tag, $"ModeTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return BindingBase instance.");
+ var ret = t2.Mode;
+ Assert.AreEqual(BindingMode.Default, ret, "Should be equal");
+
+ tlog.Debug(tag, $"ModeTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase StringFormat")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.StringFormat A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void StringFormatTest()
+ {
+ tlog.Debug(tag, $"StringFormatTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return BindingBase instance.");
+
+ var ret = t2.StringFormat;
+ Assert.IsNull(ret, "null StringFormat");
+
+ tlog.Debug(tag, $"StringFormatTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase TargetNullValue")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.TargetNullValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void TargetNullValueTest()
+ {
+ tlog.Debug(tag, $"TargetNullValueTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+
+ var ret = t2.TargetNullValue;
+ Assert.IsNull(ret, "null TargetNullValue");
+
+ tlog.Debug(tag, $"TargetNullValueTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase FallbackValue")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.FallbackValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void FallbackValueTest()
+ {
+ tlog.Debug(tag, $"FallbackValueTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+
+ var ret = t2.FallbackValue;
+ Assert.IsNull(ret, "null FallbackValue");
+
+ tlog.Debug(tag, $"FallbackValueTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase AllowChaining")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.AllowChaining A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void AllowChainingTest()
+ {
+ tlog.Debug(tag, $"AllowChainingTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ t2.AllowChaining = true;
+ Assert.True(t2.AllowChaining, "Should be true");
+ t2.AllowChaining = false;
+ Assert.False(t2.AllowChaining, "Should be false"); ;
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"AllowChainingTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase Context ")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.Context A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ContextTest()
+ {
+ tlog.Debug(tag, $"ContextTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ t2.Context = null;
+ Assert.IsNull(t2.Context, "Should go here");
+
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ContextTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase IsApplied ")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.IsApplied A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void IsAppliedTest()
+ {
+ tlog.Debug(tag, $"ContextTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsFalse(t2.IsApplied, "Should be false by default");
+
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ContextTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingBase Apply")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingBase.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void CloneTest()
+ {
+ tlog.Debug(tag, $"CloneTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Binding.Binding c = t2.Clone() as Binding.Binding;
+ Assert.IsNotNull(c, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"CloneTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/BindingTypeConverter")]
+ internal class PublicBindingTypeConverterTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingTypeConverter BindingTypeConverter")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingTypeConverter.BindingTypeConverter C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void BindingTypeConverterConstructor()
+ {
+ tlog.Debug(tag, $"BindingTypeConverterConstructor START");
+ Type type = typeof(string);
+ BindingTypeConverter t2 = new BindingTypeConverter();
+ Assert.IsNotNull(t2, "null BindingTypeConverter");
+ Assert.IsInstanceOf<BindingTypeConverter>(t2, "Should return BindingTypeConverter instance.");
+ tlog.Debug(tag, $"BindingTypeConverterConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("BindingTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.BindingTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest START");
+ try
+ {
+ BindingTypeConverter t2 = new BindingTypeConverter();
+ Assert.IsNotNull(t2, "null BindingTypeConverter");
+ var b = t2.ConvertFromInvariantString("Binding");
+ Assert.IsNotNull(b, "null Binding"); ;
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest END (OK)");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/ColorTypeConverter")]
+ internal class PublicColorTypeConverterTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorTypeConverter ColorTypeConverter")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ColorTypeConverter C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void ColorTypeConverterConstructor()
+ {
+ tlog.Debug(tag, $"ColorTypeConverterConstructor START");
+ Type type = typeof(string);
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ Assert.IsNotNull(t2, "null ColorTypeConverter");
+ Assert.IsInstanceOf<ColorTypeConverter>(t2, "Should return ColorTypeConverter instance.");
+ tlog.Debug(tag, $"ColorTypeConverterConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest1()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest1 START");
+ try
+ {
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ Assert.IsNotNull(t2, "null ColorTypeConverter");
+ var b = t2.ConvertFromInvariantString("Black");
+ Assert.IsNotNull(b, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest2()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 START");
+ try
+ {
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ Assert.IsNotNull(t2, "null ColorTypeConverter");
+ var b1 = t2.ConvertFromInvariantString("#FFF");
+ Assert.IsNotNull(b1, "null Binding");
+ var b2 = t2.ConvertFromInvariantString("#F");
+ Assert.IsNotNull(b2, "null Binding");
+ //var b3 = t2.ConvertFromInvariantString("FFF");
+ //Assert.IsNotNull(b3, "null Binding");
+ var b4 = t2.ConvertFromInvariantString("#FFF1");
+ Assert.IsNotNull(b4, "null Binding");
+ var b5 = t2.ConvertFromInvariantString("#F1F3F1");
+ Assert.IsNotNull(b5, "null Binding");
+ var b6 = t2.ConvertFromInvariantString("#F1F3F134");
+ Assert.IsNotNull(b6, "null Binding");
+ var b7 = t2.ConvertFromInvariantString("#ABG");
+ Assert.IsNotNull(b7, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest3()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest3 START");
+ try
+ {
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ Assert.IsNotNull(t2, "null ColorTypeConverter");
+ var b1 = t2.ConvertFromInvariantString("Color.Red");
+ Assert.IsNotNull(b1, "null Binding");
+ var b2 = t2.ConvertFromInvariantString("Color.White");
+ Assert.IsNotNull(b2, "null Binding");
+ var b3 = t2.ConvertFromInvariantString("Color.Green");
+ Assert.IsNotNull(b3, "null Binding");
+ var b4 = t2.ConvertFromInvariantString("Color.Blue");
+ Assert.IsNotNull(b4, "null Binding");
+ var b5 = t2.ConvertFromInvariantString("Color.Yellow");
+ Assert.IsNotNull(b5, "null Binding");
+ var b6 = t2.ConvertFromInvariantString("Color.Magenta");
+ Assert.IsNotNull(b6, "null Binding");
+ var b7 = t2.ConvertFromInvariantString("Color.Cyan");
+ Assert.IsNotNull(b7, "null Binding");
+ var b8 = t2.ConvertFromInvariantString("Color.Transparent");
+ Assert.IsNotNull(b8, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest4()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest4 START");
+ try
+ {
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ Assert.IsNotNull(t2, "null ColorTypeConverter");
+ var b = t2.ConvertFromInvariantString("0.5,1,1,0.8");
+ Assert.IsNotNull(b, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest4 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ColorTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ public void ConvertFromInvariantStringTest5()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest5 START");
+
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ Assert.Throws<InvalidOperationException>(() => t2.ConvertFromInvariantString("Color.Pink")); //Pink not exist
+
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest5 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorTypeConverter ToHex")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ConvertToString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertToStringTest1()
+ {
+ tlog.Debug(tag, $"ConvertToStringTest1 START");
+
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ Color red = Color.Red;
+ string r = t2.ConvertToString(red);
+ Assert.IsNotNull(r, "Should not be null");
+
+ tlog.Debug(tag, $"ConvertToStringTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ColorTypeConverter ConvertToString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ColorTypeConverter.ConvertToString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertToStringTest2()
+ {
+ tlog.Debug(tag, $"ConvertToStringTest2 START");
+
+ ColorTypeConverter t2 = new ColorTypeConverter();
+ string r = t2.ConvertToString(null);
+ Assert.AreEqual(string.Empty, r, "Should be equal");
+
+ tlog.Debug(tag, $"ConvertToStringTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Command")]
+ internal class PublicCommandTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action")]
+ public void CommandConstructor()
+ {
+ tlog.Debug(tag, $"CommandConstructor START");
+ Command t2 = new Command(() => { });
+ Assert.IsNotNull(t2, "null Command");
+ Assert.IsInstanceOf<Command>(t2, "Should return Command instance.");
+ tlog.Debug(tag, $"CommandConstructor END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<object>")]
+ public void CommandConstructor2()
+ {
+ tlog.Debug(tag, $"CommandConstructor2 START");
+ Assert.Throws<ArgumentNullException>(() => new Command((Action<object>)null));
+ tlog.Debug(tag, $"CommandConstructor2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<object>")]
+ public void CommandConstructor3()
+ {
+ tlog.Debug(tag, $"CommandConstructor3 START");
+ Command t2 = new Command((obj) => { });
+ Assert.IsNotNull(t2, "null Command");
+ Assert.IsInstanceOf<Command>(t2, "Should return Command instance.");
+ tlog.Debug(tag, $"CommandConstructor3 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action")]
+ public void CommandConstructor4()
+ {
+ tlog.Debug(tag, $"CommandConstructor4 START");
+ Assert.Throws<ArgumentNullException>(() => new Command((Action)null));
+ tlog.Debug(tag, $"CommandConstructor4 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<object>,Func<object,bool>")]
+ public void CommandConstructor5()
+ {
+ tlog.Debug(tag, $"CommandConstructor5 START");
+ Command t2 = new Command((obj) => { }, (obj) => { return true; });
+ Assert.IsNotNull(t2, "null Command");
+ Assert.IsInstanceOf<Command>(t2, "Should return Command instance.");
+ tlog.Debug(tag, $"CommandConstructor5 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<object>,Func<object,bool>")]
+ public void CommandConstructor6()
+ {
+ tlog.Debug(tag, $"CommandConstructor6 START");
+ Assert.Throws<ArgumentNullException>(() => new Command((obj) => { }, (Func<object, bool>)null));
+ tlog.Debug(tag, $"CommandConstructor6 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action,Func<bool>")]
+ public void CommandConstructor7()
+ {
+ tlog.Debug(tag, $"CommandConstructor7 START");
+ Command t2 = new Command(() => { }, () => { return true; });
+ Assert.IsNotNull(t2, "null Command");
+ Assert.IsInstanceOf<Command>(t2, "Should return Command instance.");
+ tlog.Debug(tag, $"CommandConstructor7 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action,Func<bool>")]
+ public void CommandConstructor8()
+ {
+ tlog.Debug(tag, $"CommandConstructor8 START");
+ Assert.Throws<ArgumentNullException>(() => new Command((Action)null, ()=> { return true; }));
+ tlog.Debug(tag, $"CommandConstructor8 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action,Func<bool>")]
+ public void CommandConstructor9()
+ {
+ tlog.Debug(tag, $"CommandConstructor9 START");
+ Assert.Throws<ArgumentNullException>(() => new Command(() => { }, (Func<bool>)null));
+ tlog.Debug(tag, $"CommandConstructor9 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command CanExecute")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.CanExecute M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void CanExecuteTest()
+ {
+ tlog.Debug(tag, $"CanExecuteTest START");
+ try
+ {
+ Command t2 = new Command((obj)=> { }, (obj) => { return true; });
+ Assert.IsNotNull(t2, "null Command");
+ bool ret = t2.CanExecute("para");
+ Assert.IsTrue(ret, "Should be true");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"CanExecuteTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command CanExecute")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.CanExecute M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void CanExecuteTest2()
+ {
+ tlog.Debug(tag, $"CanExecuteTest2 START");
+ try
+ {
+ Command t2 = new Command((obj) => { }, (obj) => { return true; });
+ Assert.IsNotNull(t2, "null Command");
+ bool ret = t2.CanExecute("para"); //default return true
+ Assert.IsTrue(ret, "Should be true");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"CanExecuteTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command CanExecute")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Execute M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ExecuteTest()
+ {
+ tlog.Debug(tag, $"ExecuteTest START");
+ try
+ {
+ Command t2 = new Command((obj) => { }, (obj) => { return true; });
+ Assert.IsNotNull(t2, "null Command");
+ t2.Execute("para");
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ExecuteTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command CanExecute")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.ChangeCanExecute M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ChangeCanExecuteTest()
+ {
+ tlog.Debug(tag, $"ChangeCanExecuteTest START");
+ try
+ {
+ Command t2 = new Command((obj) => { }, (obj) => { return true; });
+ Assert.IsNotNull(t2, "null Command");
+ t2.ChangeCanExecute();
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ChangeCanExecuteTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command<T>.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<T>")]
+ public void CommandConstructor10()
+ {
+ tlog.Debug(tag, $"CommandConstructor10 START");
+ Command t2 = new Command<object>((obj) => { });
+ Assert.IsNotNull(t2, "null Command");
+ Assert.IsInstanceOf<Command>(t2, "Should return Command instance.");
+ tlog.Debug(tag, $"CommandConstructor10 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command<T>.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<T>,Func<T,bool>")]
+ public void CommandConstructor11()
+ {
+ tlog.Debug(tag, $"CommandConstructor11 START");
+ Command t2 = new Command<object>((obj) => { }, (obj) => { return true; });
+ Assert.IsNotNull(t2, "null Command");
+ Assert.IsInstanceOf<Command>(t2, "Should return Command instance.");
+ tlog.Debug(tag, $"CommandConstructor11 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command<T>.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<T>")]
+ public void CommandConstructor12()
+ {
+ tlog.Debug(tag, $"CommandConstructor12 START");
+ Assert.Throws<ArgumentNullException>(() => new Command<object>((Action<object>)null));
+ tlog.Debug(tag, $"CommandConstructor12 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<T>,Func<T,bool>")]
+ public void CommandConstructor13()
+ {
+ tlog.Debug(tag, $"CommandConstructor13 START");
+ Assert.Throws<ArgumentNullException>(() => new Command<object>((obj) => { }, (Func<object, bool>)null));
+ tlog.Debug(tag, $"CommandConstructor13 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Command Command")]
+ [Property("SPEC", "Tizen.NUI.Binding.Command.Command C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Action<T>,Func<T,bool>")]
+ public void CommandConstructor14()
+ {
+ tlog.Debug(tag, $"CommandConstructor14 START");
+ Assert.Throws<ArgumentNullException>(() => new Command<object>((Action<object>)null, (Func<object, bool>)null));
+ tlog.Debug(tag, $"CommandConstructor14 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Element")]
+ internal class PublicElementTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element AutomationId")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.AutomationId A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void AutomationIdTest()
+ {
+ tlog.Debug(tag, $"AutomationIdTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ t2.AutomationId = "View1";
+ Assert.AreEqual("View1", t2.AutomationId, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"AutomationIdTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element ClassId")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.ClassId A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ClassIdTest()
+ {
+ tlog.Debug(tag, $"ClassIdTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ t2.ClassId = "View1";
+ Assert.AreEqual("View1", t2.ClassId, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ClassIdTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element Id")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.Id A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void IdTest()
+ {
+ tlog.Debug(tag, $"IdTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ Assert.IsNotNull(t2.Id, "Should not be null");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"IdTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element ParentView")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.ParentView A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void ParentViewTest()
+ {
+ tlog.Debug(tag, $"ParentViewTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ Assert.IsNull(t2.ParentView, "Should be null");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ParentViewTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element StyleId")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.StyleId A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void StyleIdTest()
+ {
+ tlog.Debug(tag, $"StyleIdTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ t2.StyleId = "View1";
+ t2.StyleId = "View1";
+ Assert.AreEqual("View1", t2.StyleId, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"StyleIdTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element LogicalChildren ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.LogicalChildren A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void LogicalChildrenTest()
+ {
+ tlog.Debug(tag, $"LogicalChildrenTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ Assert.AreEqual(0, t2.LogicalChildren.Count, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"LogicalChildrenTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element Owned ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.Owned A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void OwnedTest()
+ {
+ tlog.Debug(tag, $"OwnedTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ t2.Owned = false;
+ Assert.AreEqual(false, t2.Owned, "Should be equal");
+ t2.Owned = true;
+ Assert.AreEqual(true, t2.Owned, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"OwnedTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element ParentOverride")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.ParentOverride A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ParentOverrideTest()
+ {
+ tlog.Debug(tag, $"OwnedTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ t2.ParentOverride = null;
+ Assert.IsNull(t2.ParentOverride, "Should be null");
+ t2.ParentOverride = null;
+ Assert.IsNull(t2.ParentOverride, "Should be null");
+ t2.ParentOverride = new View();
+ Assert.IsNotNull(t2.ParentOverride, "Should not be null");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"OwnedTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element RealParent")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.RealParent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void RealParentTest()
+ {
+ tlog.Debug(tag, $"RealParentTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ Assert.IsNull(t2.RealParent, "Should be null");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"RealParentTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element Parent")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.Parent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ParentTest()
+ {
+ tlog.Debug(tag, $"ParentTest START");
+ try
+ {
+ Animatable t2 = new Animatable();
+ Assert.IsNotNull(t2, "null Element");
+ Assert.IsNull(t2.Parent, "Should be null");
+ t2.Parent = new View();
+ Assert.IsNotNull(t2.Parent, "Should not be null");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ParentTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element SetValueFromRenderer")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.SetValueFromRenderer M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void SetValueFromRendererTest()
+ {
+ tlog.Debug(tag, $"SetValueFromRendererTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ t2.SetValueFromRenderer(View.NameProperty, "View1");
+
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"SetValueFromRendererTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element RemoveDynamicResource")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.RemoveDynamicResource M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void RemoveDynamicResourceTest()
+ {
+ tlog.Debug(tag, $"RemoveDynamicResourceTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ t2.SetDynamicResource(View.NameProperty, "View1");
+ t2.RemoveDynamicResource(View.NameProperty);
+
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"RemoveDynamicResourceTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Element Descendants")]
+ [Property("SPEC", "Tizen.NUI.Binding.Element.Descendants M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void DescendantsTest()
+ {
+ tlog.Debug(tag, $"DescendantsTest START");
+ try
+ {
+ View t2 = new View();
+ Assert.IsNotNull(t2, "null Element");
+ var ret = t2.Descendants();
+
+ Assert.IsNotNull(ret, "Should not be null");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"DescendantsTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/ElementEventArgs")]
+ internal class PublicElementEventArgsTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ElementEventArgs ElementEventArgs")]
+ [Property("SPEC", "Tizen.NUI.Binding.ElementEventArgs.ElementEventArgs C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void ElementEventArgsConstructor()
+ {
+ tlog.Debug(tag, $"ElementEventArgsConstructor START");
+
+ try
+ {
+ View view = new View();
+ ElementEventArgs t2 = new ElementEventArgs(view);
+ Assert.IsNotNull(t2, "null ElementEventArgs");
+ Assert.IsInstanceOf<ElementEventArgs>(t2, "Should return ElementEventArgs instance.");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ElementEventArgsConstructor END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ElementEventArgs ElementEventArgs")]
+ [Property("SPEC", "Tizen.NUI.Binding.ElementEventArgs.ElementEventArgs C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void ElementEventArgsConstructor2()
+ {
+ tlog.Debug(tag, $"ElementEventArgsConstructor2 START");
+ Assert.Throws<ArgumentNullException>(() => new ElementEventArgs(null));
+ tlog.Debug(tag, $"ElementEventArgsConstructor2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ElementEventArgs Element")]
+ [Property("SPEC", "Tizen.NUI.Binding.ElementEventArgs.Element A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void ElementTest1()
+ {
+ tlog.Debug(tag, $"ElementTest1 START");
+ try
+ {
+ View view = new View();
+ ElementEventArgs t2 = new ElementEventArgs(view);
+ Assert.IsNotNull(t2, "null ElementEventArgs");
+ Element elm = view as Element;
+ Assert.AreEqual(elm, t2.Element, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ElementTest1 END");
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/NameScopeExtensions")]
+ internal class PublicNameScopeExtensionsTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("NameScopeExtensions PushElement")]
+ [Property("SPEC", "Tizen.NUI.Binding.NameScopeExtensions.PushElement M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void PushElementTest1()
+ {
+ tlog.Debug(tag, $"PushElementTest1 START");
+ try
+ {
+ NameScopeExtensions.PushElement(new View());
+ NameScopeExtensions.FindByNameInCurrentNameScope<View>("View1");
+ NameScopeExtensions.PopElement();
+ Assert.True(true, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"PushElementTest1 END");
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Binding.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Registrar")]
+ internal class PublicRegistrarTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Registrar Effects ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Registrar.Effects A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void EffectsTest()
+ {
+ tlog.Debug(tag, $"EffectsTest START");
+
+ try
+ {
+ var ret = Registrar.Effects;
+ Assert.IsNotNull(ret, "null Effects");
+ Assert.AreEqual(0, ret.Count, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"EffectsTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Registrar ExtraAssemblies")]
+ [Property("SPEC", "Tizen.NUI.Binding.Registrar.ExtraAssemblies A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ExtraAssembliesTest()
+ {
+ tlog.Debug(tag, $"ExtraAssemblies START");
+
+ try
+ {
+ Registrar.ExtraAssemblies = null;
+ Assert.IsNull(Registrar.ExtraAssemblies, "null ExtraAssemblies");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"ExtraAssemblies END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Registrar Register")]
+ [Property("SPEC", "Tizen.NUI.Binding.Registrar<TRegistrable>.Register M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void RegisterTest()
+ {
+ tlog.Debug(tag, $"RegisterTest START");
+ try
+ {
+ var re = new Registrar<View>();
+ re.Register(typeof(View), typeof(View));
+ var ret = re.GetHandlerType(typeof(View));
+ Assert.AreEqual(typeof(View), ret, "Should be equal");
+ var ret2 = re.GetHandlerType(typeof(Element));
+ Assert.IsNull(ret2, "Should be null");
+
+ var ret3 = re.GetHandlerTypeForObject(new View());
+ Assert.AreEqual(typeof(View), ret, "Should be equal");
+ }
+ catch(Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"RegisterTest END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Registrar Register")]
+ [Property("SPEC", "Tizen.NUI.Binding.Registrar<TRegistrable>.Register M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void RegisterTest2()
+ {
+ tlog.Debug(tag, $"RegisterTest2 START");
+ var re = new Registrar<View>();
+ Assert.Throws<ArgumentNullException>(() => re.GetHandlerTypeForObject(null));
+ tlog.Debug(tag, $"RegisterTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/ResourceDictionary")]
+ internal class PublicResourceDictionaryTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResourceDictionary MergedWith")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.MergedWith A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void MergedWithTest1()
+ {
+ tlog.Debug(tag, $"MergedWithTest1 START");
+
+ try
+ {
+ ResourceDictionary t1 = new ResourceDictionary();
+ Assert.IsNotNull(t1, "null ResourceDictionary");
+ ResourceDictionary t2 = new ResourceDictionary();
+ Assert.IsNotNull(t2, "null ResourceDictionary");
+ t2.MergedWith = typeof(ResourceDictionary);
+ t2.MergedWith = typeof(ResourceDictionary);
+
+ t1.Source = null;
+ Assert.IsNull(t1.Source, "Should be null");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"MergedWithTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResourceDictionary SetAndLoadSource")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.SetAndLoadSource M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void SetAndLoadSourceTest()
+ {
+ tlog.Debug(tag, $"SetAndLoadSourceTest START");
+ try
+ {
+ ResourceDictionary t1 = new ResourceDictionary();
+ Assert.IsNotNull(t1, "null ResourceDictionary");
+ //t1.SetAndLoadSource(new Uri("http://www.contoso.com/"), "X", typeof(View).Assembly, null);
+ //Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"SetAndLoadSourceTest END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ResourceDictionary SetAndLoadSource")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.SetAndLoadSource M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void SetAndLoadSourceTest2()
+ {
+ tlog.Debug(tag, $"SetAndLoadSourceTest2 START");
+ ResourceDictionary t1 = new ResourceDictionary();
+ Assert.IsNotNull(t1, "null ResourceDictionary");
+ ResourceDictionary t2 = new ResourceDictionary();
+ Assert.IsNotNull(t2, "null ResourceDictionary");
+ t1.MergedWith = typeof(ResourceDictionary);
+ //Assert.Throws<ArgumentException>(() => t1.SetAndLoadSource(new Uri("http://www.contoso.com/"), "X", typeof(View).Assembly, null));
+
+ tlog.Debug(tag, $"SetAndLoadSourceTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResourceDictionary MergedDictionaries")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.MergedDictionaries A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void MergedDictionariesTest1()
+ {
+ tlog.Debug(tag, $"MergedDictionariesTest1 START");
+ try
+ {
+ ResourceDictionary t2 = new ResourceDictionary();
+ Assert.IsNotNull(t2, "null ResourceDictionary");
+ Assert.IsNotNull(t2.MergedDictionaries, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"MergedDictionariesTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResourceDictionary Clear")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ClearTest1()
+ {
+ tlog.Debug(tag, $"ClearTest1 START");
+ try
+ {
+ ResourceDictionary t2 = new ResourceDictionary();
+ Assert.IsNotNull(t2, "null ResourceDictionary");
+ t2.Clear();
+ Assert.AreEqual(0, t2.Count, "Should be equal");
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ClearTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResourceDictionary Add")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void AddTest1()
+ {
+ tlog.Debug(tag, $"AddTest1 START");
+ try
+ {
+ ResourceDictionary t2 = new ResourceDictionary();
+ Assert.IsNotNull(t2, "null ResourceDictionary");
+ t2.Add("AA", "AA");
+ var ret = t2.ContainsKey("AA");
+ Assert.AreEqual(true, ret, "Should be equal");
+ var ret2 = t2["AA"];
+ Assert.AreEqual("AA", ret2, "Should be equal");
+ Assert.AreEqual(1, t2.Keys.Count, "Should be equal");
+ Assert.AreEqual(1, t2.Values.Count, "Should be equal");
+ Assert.IsNotNull(t2.GetEnumerator(), "null Enumerator");
+ object ss;
+ t2.TryGetValue("AA", out ss);
+ Assert.AreEqual("AA", ss as string, "Should be equal");
+ var ret3 = t2.Remove("AA");
+ Assert.True(ret3, "Should be true");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"AddTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ResourceDictionary Add")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void AddTest2()
+ {
+ tlog.Debug(tag, $"AddTest2 START");
+ try
+ {
+ ResourceDictionary t1 = new ResourceDictionary();
+ Assert.IsNotNull(t1, "null ResourceDictionary");
+ t1.Add("AA", "AA");
+ ResourceDictionary t2 = new ResourceDictionary();
+ Assert.IsNotNull(t2, "null ResourceDictionary");
+ t2.Add("BB", "BB");
+ t2.Add(t1);
+
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"AddTest2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("ResourceDictionary Add")]
+ [Property("SPEC", "Tizen.NUI.Binding.ResourceDictionary.RDSourceTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ConvertFromInvariantStringTest()
+ {
+ tlog.Debug(tag, $"AddTest2 START");
+ ResourceDictionary.RDSourceTypeConverter r = new ResourceDictionary.RDSourceTypeConverter();
+ Assert.Throws<NotImplementedException>(() => r.ConvertFromInvariantString("Test"));
+ tlog.Debug(tag, $"AddTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Setter")]
+ internal class PublicSetterTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Setter Setter")]
+ [Property("SPEC", "Tizen.NUI.Binding.Setter.Setter C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void SetterConstructor()
+ {
+ tlog.Debug(tag, $"SetterConstructor START");
+
+ try
+ {
+ Setter t2 = new Setter();
+ Assert.IsNotNull(t2, "null Setter");
+ Assert.IsInstanceOf<Setter>(t2, "Should return Setter instance.");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"SetterConstructor END");
+ }
+
+ //[Test]
+ //[Category("P2")]
+ //[Description("Setter Setter")]
+ //[Property("SPEC", "Tizen.NUI.Binding.Setter.Setter C")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "CONSTR")]
+ //public void SetterConstructor2()
+ //{
+ // tlog.Debug(tag, $"SetterConstructor2 START");
+ // Assert.Throws<ArgumentNullException>(() => new Setter());
+ // tlog.Debug(tag, $"SetterConstructor2 END");
+ //}
+
+ [Test]
+ [Category("P1")]
+ [Description("Setter Property ")]
+ [Property("SPEC", "Tizen.NUI.Binding.Setter.Property A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void PropertyTest1()
+ {
+ tlog.Debug(tag, $"PropertyTest1 START");
+ try
+ {
+ Setter t2 = new Setter();
+ Assert.IsNotNull(t2, "null Setter");
+ t2.Property = View.NameProperty;
+
+ Assert.AreEqual(View.NameProperty, t2.Property, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"PropertyTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Setter Value")]
+ [Property("SPEC", "Tizen.NUI.Binding.Setter.Value A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ValueTest1()
+ {
+ tlog.Debug(tag, $"ValueTest1 START");
+ try
+ {
+ Setter t2 = new Setter();
+ Assert.IsNotNull(t2, "null Setter");
+ View view = new View();
+ t2.Value = view;
+
+ Assert.AreEqual(view, t2.Value, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ValueTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Setter Apply")]
+ [Property("SPEC", "Tizen.NUI.Binding.Setter.Apply A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ApplyTest1()
+ {
+ tlog.Debug(tag, $"ApplyTest1 START");
+ try
+ {
+ Setter t2 = new Setter();
+ Assert.IsNotNull(t2, "null Setter");
+ View view = new View();
+ t2.Apply(view);
+ t2.UnApply(view);
+ t2.Property = View.NameProperty;
+ t2.Apply(view);
+ t2.UnApply(view);
+ view.Name = "View1";
+ t2.Apply(view);
+ t2.UnApply(view);
+ Assert.True(true, "Should go here");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ApplyTest1 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Setter Apply")]
+ [Property("SPEC", "Tizen.NUI.Binding.Setter.Apply A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ApplyTest2()
+ {
+ tlog.Debug(tag, $"ApplyTest2 START");
+ Setter t2 = new Setter();
+ Assert.IsNotNull(t2, "null Setter");
+ Assert.Throws<ArgumentNullException>(() => t2.Apply(null));
+ Assert.Throws<ArgumentNullException>(() => t2.UnApply(null));
+ tlog.Debug(tag, $"ApplyTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/ShadowTypeConverter")]
+ internal class PublicShadowTypeConverterTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ShadowTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ShadowTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest1()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest1 START");
+ ShadowTypeConverter t2 = new ShadowTypeConverter();
+ Assert.IsNotNull(t2, "null ShadowTypeConverter");
+ var ret1 = t2.ConvertFromInvariantString("1.0 | #AABBCCFF");
+ Assert.IsNotNull(ret1, "null Shadow");
+ var ret2 = t2.ConvertFromInvariantString("6.2 | #AABBCC | 5.0, 5.0");
+ Assert.IsNotNull(ret2, "null Shadow");
+ var ret3 = t2.ConvertFromInvariantString("8.0 | #AABBCC | 5.0, 5.0 | 7.0, 8.0");
+ Assert.IsNotNull(ret3, "null Shadow");
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ShadowTypeConverter ConvertToString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ShadowTypeConverter.ConvertToString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertToStringTest1()
+ {
+ tlog.Debug(tag, $"ConvertToStringTest1 START");
+
+ ShadowTypeConverter t2 = new ShadowTypeConverter();
+ Assert.IsNotNull(t2, "null ShadowTypeConverter");
+ var ret1 = t2.ConvertToString(null);
+ Assert.AreEqual(string.Empty, ret1, "null Shadow");
+ var ret2 = t2.ConvertToString(new Shadow(8, Color.Red, new Vector2(5,5), new Vector2(1,1)));
+ Assert.IsNotNull(ret2, "null Shadow");
+
+ tlog.Debug(tag, $"ConvertToStringTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageShadowTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ImageShadowTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest2()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 START");
+ ImageShadowTypeConverter t2 = new ImageShadowTypeConverter();
+ Assert.IsNotNull(t2, "null ImageShadowTypeConverter");
+ var ret1 = t2.ConvertFromInvariantString("*Resource*/button_9patch.png");
+ Assert.IsNotNull(ret1, "null ImageShadow");
+ var ret2 = t2.ConvertFromInvariantString("*Resource*/button_9patch.png | 5.0, 5.0");
+ Assert.IsNotNull(ret2, "null ImageShadow");
+ var ret3 = t2.ConvertFromInvariantString("*Resource*/button_9patch.png | 5.0, 5.0 | 7.0, 8.0");
+ Assert.IsNotNull(ret3, "null ImageShadow");
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("ImageShadowTypeConverter ConvertToString")]
+ [Property("SPEC", "Tizen.NUI.Binding.ImageShadowTypeConverter.ConvertToString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertToStringTest2()
+ {
+ tlog.Debug(tag, $"ConvertToStringTest2 START");
+
+ ImageShadowTypeConverter t2 = new ImageShadowTypeConverter();
+ Assert.IsNotNull(t2, "null ImageShadowTypeConverter");
+ var ret1 = t2.ConvertToString(null);
+ Assert.AreEqual(string.Empty, ret1, "null ImageShadow");
+ var ret2 = t2.ConvertToString(new ImageShadow("*Resource*/button_9patch.png", new Vector2(5,5), new Vector2(7,8)));
+ Assert.IsNotNull(ret2, "null ImageShadow");
+
+ tlog.Debug(tag, $"ConvertToStringTest2 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/SizeTypeConverter")]
+ internal class PublicSizeTypeConverterTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SizeTypeConverter SizeTypeConverter")]
+ [Property("SPEC", "Tizen.NUI.Binding.SizeTypeConverter.SizeTypeConverter C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void SizeTypeConverterConstructor()
+ {
+ tlog.Debug(tag, $"SizeTypeConverterConstructor START");
+ Type type = typeof(string);
+ SizeTypeConverter t2 = new SizeTypeConverter();
+ Assert.IsNotNull(t2, "null SizeTypeConverter");
+ Assert.IsInstanceOf<SizeTypeConverter>(t2, "Should return SizeTypeConverter instance.");
+ tlog.Debug(tag, $"SizeTypeConverterConstructor END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SizeTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.SizeTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest START");
+ try
+ {
+ SizeTypeConverter t2 = new SizeTypeConverter();
+ Assert.IsNotNull(t2, "null SizeTypeConverter");
+ var b = t2.ConvertFromInvariantString("2,2");
+ Assert.IsNotNull(b, "null Binding");
+ var b2 = t2.ConvertFromInvariantString("2,2,2");
+ Assert.IsNotNull(b2, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("SizeTypeConverter ConvertToString")]
+ [Property("SPEC", "Tizen.NUI.Binding.SizeTypeConverter.ConvertToString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertToStringTest2()
+ {
+ tlog.Debug(tag, $"ConvertToStringTest2 START");
+
+ SizeTypeConverter t2 = new SizeTypeConverter();
+ Assert.IsNotNull(t2, "null SizeTypeConverter");
+ var ret1 = t2.ConvertToString(null);
+ Assert.AreEqual(string.Empty, ret1, "null ImageShadow");
+ var ret2 = t2.ConvertToString(new Size(2,2,2));
+ Assert.IsNotNull(ret2, "null Size");
+
+ tlog.Debug(tag, $"ConvertToStringTest2 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("SizeTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.SizeTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest3()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest3 START");
+
+ SizeTypeConverter t2 = new SizeTypeConverter();
+ Assert.IsNotNull(t2, "null SizeTypeConverter");
+ Assert.Throws<InvalidOperationException>(() => t2.ConvertFromInvariantString(null));
+
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest3 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Size2DTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.Size2DTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest2()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 START");
+ try
+ {
+ Size2DTypeConverter t2 = new Size2DTypeConverter();
+ Assert.IsNotNull(t2, "null Size2DTypeConverter");
+ var b = t2.ConvertFromInvariantString("2,2");
+ Assert.IsNotNull(b, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest2 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Size2DTypeConverter ConvertToString")]
+ [Property("SPEC", "Tizen.NUI.Binding.Size2DTypeConverter.ConvertToString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertToStringTest3()
+ {
+ tlog.Debug(tag, $"ConvertToStringTest2 START");
+
+ Size2DTypeConverter t2 = new Size2DTypeConverter();
+ Assert.IsNotNull(t2, "null Size2DTypeConverter");
+ var ret1 = t2.ConvertToString(null);
+ Assert.AreEqual(string.Empty, ret1, "null ImageShadow");
+ var ret2 = t2.ConvertToString(new Size2D(2, 2));
+ Assert.IsNotNull(ret2, "null Size");
+
+ tlog.Debug(tag, $"ConvertToStringTest3 END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Size2DTypeConverter ConvertFromInvariantString")]
+ [Property("SPEC", "Tizen.NUI.Binding.Size2DTypeConverter.ConvertFromInvariantString M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void ConvertFromInvariantStringTest4()
+ {
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest4 START");
+
+ Size2DTypeConverter t2 = new Size2DTypeConverter();
+ Assert.IsNotNull(t2, "null Size2DTypeConverter");
+ Assert.Throws<InvalidOperationException>(() => t2.ConvertFromInvariantString(null));
+
+ tlog.Debug(tag, $"ConvertFromInvariantStringTest4 END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/Trigger")]
+ internal class PublicTriggerTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Trigger Trigger")]
+ [Property("SPEC", "Tizen.NUI.Binding.Trigger.Trigger C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void TriggerConstructor()
+ {
+ tlog.Debug(tag, $"TriggerConstructor START");
+
+ try
+ {
+ Trigger t2 = new Trigger(typeof(View));
+
+ Assert.IsNotNull(t2, "null Trigger");
+ Assert.IsInstanceOf<Trigger>(t2, "Should return Trigger instance.");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"TriggerConstructor END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Trigger Trigger")]
+ [Property("SPEC", "Tizen.NUI.Binding.Trigger.Trigger C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void TriggerConstructor2()
+ {
+ tlog.Debug(tag, $"TriggerConstructor2 START");
+
+ Assert.Throws<ArgumentNullException>(() => new Trigger(null));
+
+ tlog.Debug(tag, $"TriggerConstructor2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Trigger BindableProperty")]
+ [Property("SPEC", "Tizen.NUI.Binding.Trigger.BindableProperty A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void BindablePropertyTest1()
+ {
+ tlog.Debug(tag, $"BindablePropertyTest1 START");
+ try
+ {
+ Trigger t2 = new Trigger(typeof(ImageView));
+ Assert.IsNotNull(t2, "null Trigger");
+ t2.Property = ImageView.ResourceUrlProperty;
+ Assert.AreEqual(ImageView.ResourceUrlProperty, t2.Property, "Should be equal");
+ //<Setter Property="PositionX" Value="500" />
+ t2.Value = "*Resource*/arrow.jpg";
+ Assert.IsNotNull(t2.Value, "null Trigger value");
+
+ Assert.AreEqual(0, t2.Setters.Count, "Should be equal");
+ Assert.AreEqual(0, t2.EnterActions.Count, "Should be equal");
+ Assert.AreEqual(0, t2.ExitActions.Count, "Should be equal");
+ Type re = t2.TargetType;
+ Assert.IsNotNull(re, "null Trigger value");
+ Assert.AreEqual(false, t2.IsSealed, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"BindablePropertyTest1 END");
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/TriggerAction")]
+ internal class PublicTriggerActionTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ public class TriggerActionImpl<T> : TriggerAction<T> where T : BindableObject
+ {
+ Type type;
+
+ protected override void Invoke(T sender)
+ {
+ type = AssociatedType;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TriggerAction TriggerAction")]
+ [Property("SPEC", "Tizen.NUI.Binding.TriggerAction.TriggerAction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void TriggerActionConstructor()
+ {
+ tlog.Debug(tag, $"TriggerActionConstructor START");
+
+ try
+ {
+ TriggerActionImpl<View> t2 = new TriggerActionImpl<View>();
+ Assert.IsNotNull(t2, "null TriggerAction");
+ Assert.IsInstanceOf<TriggerActionImpl<View>>(t2, "Should return TriggerActionImpl<View> instance.");
+ t2.DoInvoke(null);
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"TriggerActionConstructor END");
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/TypedBinding")]
+ internal class PublicTypedBindingTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding Mode")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.Mode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ModeTest()
+ {
+ tlog.Debug(tag, $"ModeTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return TypedBinding instance.");
+ var ret = t2.Mode;
+ Assert.AreEqual(BindingMode.Default, ret, "Should be equal");
+
+ tlog.Debug(tag, $"ModeTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding StringFormat")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.StringFormat A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void StringFormatTest()
+ {
+ tlog.Debug(tag, $"StringFormatTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return TypedBinding instance.");
+
+ var ret = t2.StringFormat;
+ Assert.IsNull(ret, "null StringFormat");
+
+ tlog.Debug(tag, $"StringFormatTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding TargetNullValue")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.TargetNullValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void TargetNullValueTest()
+ {
+ tlog.Debug(tag, $"TargetNullValueTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+
+ var ret = t2.TargetNullValue;
+ Assert.IsNull(ret, "null TargetNullValue");
+
+ tlog.Debug(tag, $"TargetNullValueTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding FallbackValue")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.FallbackValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void FallbackValueTest()
+ {
+ tlog.Debug(tag, $"FallbackValueTest START");
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsInstanceOf<Binding.Binding>(t2, "Should return Binding instance.");
+
+ var ret = t2.FallbackValue;
+ Assert.IsNull(ret, "null FallbackValue");
+
+ tlog.Debug(tag, $"FallbackValueTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding AllowChaining")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.AllowChaining A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void AllowChainingTest()
+ {
+ tlog.Debug(tag, $"AllowChainingTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ t2.AllowChaining = true;
+ Assert.True(t2.AllowChaining, "Should be true");
+ t2.AllowChaining = false;
+ Assert.False(t2.AllowChaining, "Should be false"); ;
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"AllowChainingTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding Context ")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.Context A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ContextTest()
+ {
+ tlog.Debug(tag, $"ContextTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ t2.Context = null;
+ Assert.IsNull(t2.Context, "Should go here");
+
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ContextTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding IsApplied ")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.IsApplied A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void IsAppliedTest()
+ {
+ tlog.Debug(tag, $"ContextTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Assert.IsFalse(t2.IsApplied, "Should be false by default");
+
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ContextTest END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypedBinding Apply")]
+ [Property("SPEC", "Tizen.NUI.Binding.TypedBinding.Clone M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ public void CloneTest()
+ {
+ tlog.Debug(tag, $"CloneTest START");
+ try
+ {
+ Binding.Binding t2 = new Binding.Binding("Test");
+ Assert.IsNotNull(t2, "null Binding");
+ Binding.Binding c = t2.Clone() as Binding.Binding;
+ Assert.IsNotNull(c, "null Binding");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"CloneTest END");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+using NUnit.Framework;
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/XamlBinding/XamlStyle")]
+ internal class PublicXamlStyleTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle XamlStyle")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.XamlStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void XamlStyleConstructor()
+ {
+ tlog.Debug(tag, $"XamlStyleConstructor START");
+
+ try
+ {
+ XamlStyle t2 = new XamlStyle(typeof(View));
+ Assert.IsNotNull(t2, "null XamlStyle");
+ Assert.IsInstanceOf<XamlStyle>(t2, "Should return XamlStyle instance.");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"XamlStyleConstructor END");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("XamlStyle XamlStyle")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.XamlStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ public void XamlStyleConstructor2()
+ {
+ tlog.Debug(tag, $"XamlStyleConstructor2 START");
+ Assert.Throws<ArgumentNullException>(() => new XamlStyle(null));
+ tlog.Debug(tag, $"XamlStyleConstructor2 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle ApplyToDerivedTypes ")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.ApplyToDerivedTypes A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ApplyToDerivedTypesTest1()
+ {
+ tlog.Debug(tag, $"ApplyToDerivedTypesTest1 START");
+ try
+ {
+ XamlStyle t2 = new XamlStyle(typeof(View));
+ Assert.IsNotNull(t2, "null XamlStyle");
+ t2.ApplyToDerivedTypes = true;
+ Assert.AreEqual(true, t2.ApplyToDerivedTypes, "Should be equal");
+
+ t2.ApplyToDerivedTypes = false;
+ Assert.AreEqual(false, t2.ApplyToDerivedTypes, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ApplyToDerivedTypesTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle BasedOn")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.BasedOn A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void BasedOnTest1()
+ {
+ tlog.Debug(tag, $"BasedOnTest1 START");
+ try
+ {
+ XamlStyle t1 = new XamlStyle(typeof(View));
+ Assert.IsNotNull(t1, "null XamlStyle");
+ XamlStyle t2 = new XamlStyle(typeof(ImageView));
+ t2.BasedOn = t1;
+ Assert.AreEqual(t1, t2.BasedOn, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"BasedOnTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle BaseResourceKey")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.BaseResourceKey A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void BaseResourceKeyTest1()
+ {
+ tlog.Debug(tag, $"BaseResourceKeyTest1 START");
+ try
+ {
+ XamlStyle t2 = new XamlStyle(typeof(View));
+ Assert.IsNotNull(t2, "null XamlStyle");
+ t2.BaseResourceKey = "baseStyle";
+ Assert.AreEqual("baseStyle", t2.BaseResourceKey, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"BaseResourceKeyTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle CanCascade ")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.CanCascade A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void CanCascadeTest1()
+ {
+ tlog.Debug(tag, $"CanCascadeTest1 START");
+ try
+ {
+ XamlStyle t2 = new XamlStyle(typeof(View));
+ Assert.IsNotNull(t2, "null XamlStyle");
+ t2.CanCascade = true;
+ Assert.AreEqual(true, t2.CanCascade, "Should be equal");
+ t2.CanCascade = false;
+ Assert.AreEqual(false, t2.CanCascade, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"CanCascadeTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle Class ")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.Class A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void ClassTest1()
+ {
+ tlog.Debug(tag, $"ClassTest1 START");
+ try
+ {
+ XamlStyle t2 = new XamlStyle(typeof(View));
+ Assert.IsNotNull(t2, "null XamlStyle");
+ t2.Class = "baseStyle";
+ Assert.AreEqual("baseStyle", t2.Class, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ClassTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle Setters")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.Setters A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void SettersTest1()
+ {
+ tlog.Debug(tag, $"SettersTest1 START");
+ try
+ {
+ XamlStyle t2 = new XamlStyle(typeof(View));
+ Assert.IsNotNull(t2, "null XamlStyle");
+ Assert.AreEqual(0, t2.Setters.Count, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"SettersTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle TargetType ")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.TargetType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ public void TargetTypeTest1()
+ {
+ tlog.Debug(tag, $"TargetTypeTest1 START");
+ try
+ {
+ Type type = typeof(View);
+ XamlStyle t2 = new XamlStyle(type);
+ Assert.IsNotNull(t2, "null XamlStyle");
+ Assert.AreEqual(type, t2.TargetType, "Should be equal");
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"TargetTypeTest1 END");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("XamlStyle Apply")]
+ [Property("SPEC", "Tizen.NUI.Binding.XamlStyle.Apply A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ public void ApplyTest1()
+ {
+ tlog.Debug(tag, $"ApplyTest1 START");
+ try
+ {
+ View view = new View();
+ Assert.IsNotNull(view, "null View");
+ var style = view.MergedStyle;
+ Assert.IsNotNull(style, "null MergedStyle");
+ style.Style = new XamlStyle(typeof(View));
+ style.Apply(view);
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ tlog.Debug(tag, $"ApplyTest1 END");
+ }
+
+ //[Test]
+ //[Category("P2")]
+ //[Description("XamlStyle Apply")]
+ //[Property("SPEC", "Tizen.NUI.Binding.XamlStyle.Apply M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MCST")]
+ //public void ApplyTest2()
+ //{
+ // tlog.Debug(tag, $"ApplyTest2 START");
+ // XamlStyle t2 = new XamlStyle(typeof(View));
+ // Assert.IsNotNull(t2, "null XamlStyle");
+ // Assert.Throws<ArgumentNullException>(() => t2.Apply(null));
+ // Assert.Throws<ArgumentNullException>(() => t2.UnApply(null));
+ // tlog.Debug(tag, $"ApplyTest2 END");
+ //}
+ }
+}
\ No newline at end of file