Add Image Testcase
authorKangho Hur <kangho.hur@samsung.com>
Tue, 6 Sep 2016 04:14:57 +0000 (13:14 +0900)
committerSeungkeun Lee <sngn.lee@samsung.com>
Wed, 7 Sep 2016 06:13:45 +0000 (15:13 +0900)
Change-Id: Ie3e026ae845a614f1dd9513ba18271a0123e530c

test/ElmSharp.Test/ElmSharp.Test.csproj
test/ElmSharp.Test/TC/ImageTest1.cs [new file with mode: 0644]

index a517e7e..1c23408 100644 (file)
@@ -57,6 +57,7 @@
     <Compile Include="TC\GenListTest3.cs" />\r
     <Compile Include="TC\GenListTest4.cs" />\r
     <Compile Include="TC\GenListTest5.cs" />\r
+    <Compile Include="TC\ImageTest1.cs" />\r
     <Compile Include="TC\IconTest1.cs" />\r
     <Compile Include="TC\IndexTest1.cs" />\r
     <Compile Include="TC\IndexTest2.cs" />\r
diff --git a/test/ElmSharp.Test/TC/ImageTest1.cs b/test/ElmSharp.Test/TC/ImageTest1.cs
new file mode 100644 (file)
index 0000000..82ee3c2
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+using ElmSharp;
+using System.Collections.Generic;
+
+namespace ElmSharp.Test
+{
+    public class ImageTest1 : TestCaseBase
+    {
+        public override string TestName => "ImageTest1";
+        public override string TestDescription => "To test basic operation of Image";
+
+        public override void Run(Window window)
+        {
+            Image image = new Image(window)
+            {
+                IsFixedAspect = false
+            };
+            image.Load("/home/owner/res/picture.png");
+            image.Clicked += (e, o) =>
+            {
+                Console.WriteLine("Image has been clicked. (IsFixedAspect = {0}", image.IsFixedAspect);
+                image.IsFixedAspect = image.IsFixedAspect == true?false:true;
+            };
+
+            image.Show();
+            image.Resize(500, 500);
+            image.Move(100,100);
+        }
+    }
+}