--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+using Tizen.NUI;
+using System.Runtime.InteropServices;
+using Tizen.NUI.Test;
+
+namespace Tizen.NUI.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Palette Tests")]
+ public class PaletteSwatchTests
+ {
+ private const string TAG = "NUI";
+ private string _imgPath = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "PaletteTest.jpg";
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetRgb. Check whether GetRgb returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Swatch.GetRgb M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetRgb_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var dominantSwatch = palette.GetDominantSwatch();
+ Color color = dominantSwatch.GetRgb();
+ Assert.Greater((int)(color.R * 255), 220, "Generated R value is not correct");
+ Assert.Less((int)(color.R * 255), 230, "Generated R value is not correct");
+ Assert.Greater((int)(color.G * 255), 230, "Generated G value is not correct");
+ Assert.Less((int)(color.G * 255), 240, "Generated G value is not correct");
+ Assert.Greater((int)(color.B * 255), 220, "Generated B value is not correct");
+ Assert.Less((int)(color.B * 255), 230, "Generated B value is not correct");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetHsl. Check whether GetHsl returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Swatch.GetHsl M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetHsl_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var dominantSwatch = palette.GetDominantSwatch();
+ Assert.Greater(dominantSwatch.GetHsl()[2], 0.85f, "Generated Lightness value is not correct");
+ Assert.Less(dominantSwatch.GetHsl()[2], 0.95f, "Generated Lightness value is not correct");
+
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetTitleTextColor. Check whether GetTitleTextColor returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Swatch.GetTitleTextColor M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetTitleTextColor_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var dominantSwatch = palette.GetDominantSwatch();
+ Assert.Greater((int)(dominantSwatch.GetTitleTextColor().A * 255), 105, "Generated Alpha value is not correct");
+ Assert.Less((int)(dominantSwatch.GetTitleTextColor().A * 255), 115, "Generated Alpha value is not correct");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetBodyTextColor. Check whether GetBodyTextColor returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Swatch.GetBodyTextColor M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetBodyTextColor_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var dominantSwatch = palette.GetDominantSwatch();
+ Assert.Greater((int)(dominantSwatch.GetBodyTextColor().A * 255), 135, "Generated Alpha value is not correct");
+ Assert.Less((int)(dominantSwatch.GetBodyTextColor().A * 255), 145, "Generated Alpha value is not correct");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetPopulation. Check whether GetPopulation returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Swatch.GetPopulation M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetPopulation_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var dominantSwatch = palette.GetDominantSwatch();
+ Assert.Greater(dominantSwatch.GetPopulation(), 1700, "Generated Population value is not correct");
+ Assert.Less(dominantSwatch.GetPopulation(), 1800, "Generated Population value is not correct");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+ }
+}
--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+using Tizen.NUI;
+using System.Runtime.InteropServices;
+using Tizen.NUI.Test;
+
+namespace Tizen.NUI.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Palette Tests")]
+ public class PaletteTests
+ {
+ private const string TAG = "NUI";
+ private string _imgPath = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "PaletteTest.jpg";
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(TAG, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(TAG, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Generate with image pixel buffer. Check whether Palette is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Generate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "PixelBuffer")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void Generate_CHECK_RETURN_VALUE_WITH_PIXELBUFFER()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Verity Generate with null argument.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Generate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "PixelBuffer")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void Generate_NULL_ARGUMENT()
+ {
+ /* TEST CODE */
+ try
+ {
+ var palette = Palette.Generate(null);
+ Assert.Fail("Should return null argument exception");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.Pass("ArgumentNullException: passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GenrateAsync with image pixel buffer. Check whether Palette is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GenerateAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "PixelBuffer")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public async Task GenerateAsync_CHECK_RETURN_VALUE_WITH_PIXCELBUFFER()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ Palette palette = await Palette.GenerateAsync(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Verity GenerateAsync with null argument.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GenerateAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "PixelBuffer")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public async Task GenerateAsync_NULL_ARGUMENT()
+ {
+ /* TEST CODE */
+ try
+ {
+ var palette = await Palette.GenerateAsync(null);
+ Assert.Fail("Should return null argument exception");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.Pass("ArgumentNullException: passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a Palette object with image pixel buffer and region. Check whether Palette is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Generate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "PixelBuffer, Rectangle")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void Generate_CHECK_RETURN_VALUE_WITH_PIXELBUFFER_RECTANGLE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ Rectangle rect = new Rectangle(0, 0, 100, 100);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap, rect);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Verity Generate with null pixelbuffer and region.")]
+ [Property("SPEC", "Tizen.NUI.Palette.Generate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "PixelBuffer, Rectangle")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void Generate_NULL_ARUGUMENT_WITH_RECTANGLE()
+ {
+ /* TEST CODE */
+ Rectangle rect = new Rectangle(0, 0, 100, 100);
+ try
+ {
+ var palette = Palette.Generate(null, rect);
+ Assert.Fail("Should return null argument exception");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.Pass("ArgumentNullException: passed!");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create asynchronously Palette object with image pixel buffer and region. Check whether Palette is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GenerateAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "PixelBuffer, Rectangle")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public async Task GenerateAsync_CHECK_RETURN_VALUE_WITH_PIXELBUFFER_RECTANGLE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ Rectangle rect = new Rectangle(0, 0, 100, 100);
+ try
+ {
+ Palette palette = await Palette.GenerateAsync(imgBitmap, rect);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Verity GenerateAsync with null pixelbuffer and region.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GenerateAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "PixelBuffer, Rectangle")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public async Task GenerateAsync_NULL_ARGUMENT_WITH_RECTANGLE()
+ {
+ /* TEST CODE */
+ Rectangle rect = new Rectangle(0, 0, 100, 100);
+ try
+ {
+ var palette = await Palette.GenerateAsync(null, rect);
+ Assert.Fail("Should return null argument exception");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.Pass("ArgumentNullException: passed!");
+ }
+ }
+
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetSwatches. Check whether GetSwatches returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetSwatches M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetSwatches_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var swatches = palette.GetSwatches();
+ Assert.AreEqual(16, swatches.Count, "Should be equals to the generated swathces count");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetDominantSwatch. Check whether GetDominantSwatch returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetDominantSwatch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetDominantSwatch_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var dominantSwatch = palette.GetDominantSwatch();
+ Assert.IsNotNull(dominantSwatch, "DominantSwatch should not be null");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetVibrantSwatch. Check whether GetVibrantSwatch returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetVibrantSwatch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetVibrantSwatch_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var vibrantSwatch = palette.GetVibrantSwatch();
+ Assert.IsNotNull(vibrantSwatch, "VibrantSwatch should not be null");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetLightVibrantSwatch. Check whether GetLightVibrantSwatch returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetLightVibrantSwatch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetLightVibrantSwatch_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var lightVibrantSwatch = palette.GetLightVibrantSwatch();
+ Assert.IsNotNull(lightVibrantSwatch, "LightVibrantSwatch should not be null");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetDarkVibrantSwatch. Check whether GetDarkVibrantSwatch returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetDarkVibrantSwatch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetDarkVibrantSwatch_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var darkVibrantSwatch = palette.GetDarkVibrantSwatch();
+ Assert.IsNotNull(darkVibrantSwatch, "DarkVibrantSwatch should not be null");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetMutedSwatch. Check whether GetMutedSwatch returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetMutedSwatch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetMutedSwatch_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var mutedSwatch = palette.GetMutedSwatch();
+ Assert.IsNotNull(mutedSwatch, "MutedSwatch should not be null");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetLightMutedSwatch. Check whether GetLightMutedSwatch returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetLightMutedSwatch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetLightMutedSwatch_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var lightMutedSwatch = palette.GetLightMutedSwatch();
+ Assert.IsNotNull(lightMutedSwatch, "LightMutedSwatch should not be null");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test GetDarkMutedSwatch. Check whether GetDarkMutedSwatch returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Palette.GetDarkMutedSwatch M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Woochan Lee, wc0917.lee@samsung.com")]
+ public void GetDarkMutedSwatch_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
+ PixelBuffer imgBitmap = ImageLoading.LoadImageFromFile(_imgPath);
+ try
+ {
+ var palette = Palette.Generate(imgBitmap);
+ Assert.IsInstanceOf<Palette>(palette, "Should return Palette instance.");
+ var darkMutedSwatch = palette.GetDarkMutedSwatch();
+ Assert.IsNotNull(darkMutedSwatch, "DarkMutedSwatch should not be null");
+ }
+ catch (ArgumentNullException e)
+ {
+ Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+ }
+}