using NUnit.Framework;
using NUnit.Framework.TUnit;
using System;
+using System.Collections.Generic;
using Tizen;
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
[Test]
[Category("P1")]
+ [Description("NUIWidgetApplication constructor test. Check whether object which use multi-class created or not.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.NUIWidgetApplication C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Dictionary<System.Type, string>")]
+ [Property("AUTHOR", "Sunghyun kim, scholb.kim@samsung.com")]
+ public void NUIWidgetApplication_INIT_FOR_MULTI_INSTANCE()
+ {
+ /* TEST CODE */
+ Dictionary<Type, string> widgetSet = new Dictionary<Type, string>();
+ widgetSet.Add(typeof(MyWidget), "Tizen.NUI.Tests");
+ var widgetApplication = new NUIWidgetApplication(widgetSet);
+ Assert.IsNotNull(widgetApplication, "NUIWidgetApplication can't create successfully.");
+ Assert.IsInstanceOf<NUIWidgetApplication>(widgetApplication, "Should be an instance of NUIWidgetApplication type.");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check exception when constructing a NUIWidgetApplication with invalid value.")]
+ [Property("SPEC", "Tizen.NUI.NUIWidgetApplication.NUIWidgetApplication C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "Dictionary<System.Type, string>")]
+ [Property("AUTHOR", "Sunghyun kim, scholb.kim@samsung.com")]
+ public void NUIWidgetApplication_INIT_FOR_MULTI_INSTANCE_Exception()
+ {
+ /* TEST CODE */
+ try
+ {
+ Dictionary<Type, string> widgetSet = null;
+ var widgetApplication = new NUIWidgetApplication(widgetSet);
+ Assert.Fail("Should throw the Exception: There is no Dictionary");
+ }
+ catch(InvalidOperationException e)
+ {
+ Assert.Pass("Create a NUIWidgetApplication with invalid Dictionary");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Test Dispose, try to dispose the Widget.")]
[Property("SPEC", "Tizen.NUI.NUIWidgetApplication.Dispose M")]
[Property("SPEC_URL", "-")]