From: dongsug.song Date: Wed, 25 Sep 2019 23:23:38 +0000 (+0900) Subject: [NUI][TCSACR-267][Add CropToMask TC] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b76433420794cbdeb923b62694cfb2768dfc2e35;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][TCSACR-267][Add CropToMask TC] Change-Id: Ibd6761918092aeb1e488929b762b6373592c9165 Signed-off-by: dongsug.song --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/res/picture2.jpg b/tct-suite-vs/Tizen.NUI.Tests/res/picture2.jpg new file mode 100755 index 0000000..7a12aed Binary files /dev/null and b/tct-suite-vs/Tizen.NUI.Tests/res/picture2.jpg differ diff --git a/tct-suite-vs/Tizen.NUI.Tests/res/star-mod.png b/tct-suite-vs/Tizen.NUI.Tests/res/star-mod.png new file mode 100755 index 0000000..2e3212e Binary files /dev/null and b/tct-suite-vs/Tizen.NUI.Tests/res/star-mod.png differ diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs index f675437..364832a 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSImageView.cs @@ -410,5 +410,71 @@ namespace Tizen.NUI.Tests imageView.SynchronosLoading = false; Assert.IsFalse(imageView.SynchronosLoading, "Should be false!"); } + + [Test] + [Category("P1")] + [Description("Test CropToMask. Check whether CropToMask is readable and writable with true value.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.ImageView.CropToMask A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public async Task CropToMask_SET_GET_TRUE_VALUE() + { + /* TEST CODE */ + var imageView = new ImageView(); + + Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); + Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); + + imageView.ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture2.jpg"; + imageView.AlphaMaskURL = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "star-mod.png"; + imageView.Size2D = new Size2D(500, 500); + + imageView.CropToMask = true; + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.Add(imageView); + + await Task.Delay(1000); + + Assert.AreEqual(true, imageView.CropToMask, "Retrieved CropToMask should be equal to set value"); + + imageView.Unparent(); + } + + [Test] + [Category("P1")] + [Description("Test CropToMask. Check whether CropToMask is readable and writable with false value.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.ImageView.CropToMask A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "dongsug.song@samsung.com")] + public async Task CropToMask_SET_GET_FALSE_VALUE() + { + /* TEST CODE */ + var imageView = new ImageView(); + + Assert.IsNotNull(imageView, "Should not be a Null : ImageView"); + Assert.IsInstanceOf(imageView, "Should be an instance of : ImageView"); + + imageView.ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture2.jpg"; + imageView.AlphaMaskURL = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "star-mod.png"; + imageView.Size2D = new Size2D(500, 500); + imageView.CropToMask = false; + + Assert.IsNotNull(Window.Instance, "Should not be a Null : Window.Instance"); + Assert.IsInstanceOf(Window.Instance, "Should be an instance of : Window.Instance"); + + Window.Instance.Add(imageView); + + await Task.Delay(1000); + + Assert.AreEqual(false, imageView.CropToMask, "Retrieved CropToMask should be equal to set value"); + + imageView.Unparent(); + } + } } \ No newline at end of file