Assert.AreSame(navigator, page.Navigator, "Retrieved Navigator should be the same with the navigator which pushes the page.");
}
+ [Test]
+ [Category("P1")]
+ [Description("Test Appearing event. Check if Appearing event is callable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Page.Appearing E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Appearing_CHECK_EVENT()
+ {
+ /* PRECONDITION */
+ bool isCalled = false;
+
+ var navigator = new Navigator();
+ Assert.IsNotNull(navigator, "Can't create success object Navigator");
+ Assert.IsInstanceOf<Navigator>(navigator, "Construct Navigator Fail");
+
+ var page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+ navigator.Push(page);
+
+ page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+
+ EventHandler<PageAppearingEventArgs> appearing = (sender, args) =>
+ {
+ isCalled = true;
+ };
+
+ page.Appearing += appearing;
+
+ /* TEST CODE */
+ navigator.Push(page);
+ Assert.AreEqual(true, isCalled, "Appearing event should be called when page is started appearing by pushing the page");
+
+ page.Appearing -= appearing;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Disappearing event. Check if Disappearing event is callable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Page.Disappearing E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public async Task Disappearing_CHECK_EVENT()
+ {
+ /* PRECONDITION */
+ bool isCalled = false;
+
+ var navigator = new Navigator();
+ Assert.IsNotNull(navigator, "Can't create success object Navigator");
+ Assert.IsInstanceOf<Navigator>(navigator, "Construct Navigator Fail");
+
+ var page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+ navigator.Push(page);
+
+ page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+
+ EventHandler<PageDisappearingEventArgs> disappearing = (sender, args) =>
+ {
+ isCalled = true;
+ };
+
+ page.Disappearing += disappearing;
+
+ /* TEST CODE */
+ navigator.Push(page);
+
+ await Task.Delay(2000);
+
+ navigator.Pop();
+ Assert.AreEqual(true, isCalled, "Disappearing event should be called when page is started disappearing by popping the page");
+
+ page.Disappearing -= disappearing;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Appeared event. Check if Appeared event is callable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Page.Appeared E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public async Task Appeared_CHECK_EVENT()
+ {
+ /* PRECONDITION */
+ bool isCalled = false;
+
+ var navigator = new Navigator();
+ Assert.IsNotNull(navigator, "Can't create success object Navigator");
+ Assert.IsInstanceOf<Navigator>(navigator, "Construct Navigator Fail");
+
+ var page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+ navigator.Push(page);
+
+ page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+
+ EventHandler<PageAppearedEventArgs> appeared = (sender, args) =>
+ {
+ isCalled = true;
+ };
+
+ page.Appeared += appeared;
+
+ /* TEST CODE */
+ navigator.Push(page);
+
+ await Task.Delay(2000);
+
+ Assert.AreEqual(true, isCalled, "Appearing event should be called when page is finished appearing by pushing the page");
+
+ page.Appeared -= appeared;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Disappeared event. Check if Disappeared event is callable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Page.Disappeared E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public async Task Disappeared_CHECK_EVENT()
+ {
+ /* PRECONDITION */
+ bool isCalled = false;
+
+ var navigator = new Navigator();
+ Assert.IsNotNull(navigator, "Can't create success object Navigator");
+ Assert.IsInstanceOf<Navigator>(navigator, "Construct Navigator Fail");
+
+ var page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+ navigator.Push(page);
+
+ page = new MyPage();
+ Assert.IsNotNull(page, "Can't create success object Page");
+ Assert.IsInstanceOf<Page>(page, "Construct Page Fail");
+
+ EventHandler<PageDisappearedEventArgs> disappeared = (sender, args) =>
+ {
+ isCalled = true;
+ };
+
+ page.Disappeared += disappeared;
+
+ /* TEST CODE */
+ navigator.Push(page);
+
+ await Task.Delay(2000);
+
+ navigator.Pop();
+
+ await Task.Delay(2000);
+
+ Assert.AreEqual(true, isCalled, "Disappearing event should be called when page is finished disappearing by popping the page");
+
+ page.Disappeared -= disappeared;
+ }
+
public class MyPage : Page
{
}
--- /dev/null
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+using System;\r
+using Tizen.NUI;\r
+using Tizen.NUI.Components;\r
+using System.Runtime.InteropServices;\r
+using System.Threading.Tasks;\r
+using Tizen.NUI.Components.Test;\r
+\r
+namespace Tizen.NUI.Components.Tests\r
+{\r
+ [TestFixture]\r
+ [Description("Tizen.NUI.Components.PageAppearedEventArgs Tests")]\r
+ public class PageAppearedEventArgsTests\r
+ {\r
+ private const string TAG = "Components";\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ Tizen.Log.Info(TAG, "Init() is called!");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ Tizen.Log.Info(TAG, "Destroy() is called!");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Test PageAppearedEventArgs empty constructor. Check it has been triggered")]\r
+ [Property("SPEC", "Tizen.NUI.Components.PageAppearedEventArgs.PageAppearedEventArgs C")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "CONSTR")]\r
+ [Property("COVPARAM", "")]\r
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]\r
+ public void PageAppearedEventArgs_CHECK_VALUE()\r
+ {\r
+ /* TEST CODE */\r
+ var pageAppearedEventArgs = new PageAppearedEventArgs();\r
+ Assert.IsNotNull(pageAppearedEventArgs, "Should be not null!");\r
+ Assert.IsInstanceOf<PageAppearedEventArgs>(pageAppearedEventArgs, "Should be equal!");\r
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+using System;\r
+using Tizen.NUI;\r
+using Tizen.NUI.Components;\r
+using System.Runtime.InteropServices;\r
+using System.Threading.Tasks;\r
+using Tizen.NUI.Components.Test;\r
+\r
+namespace Tizen.NUI.Components.Tests\r
+{\r
+ [TestFixture]\r
+ [Description("Tizen.NUI.Components.PageAppearingEventArgs Tests")]\r
+ public class PageAppearingEventArgsTests\r
+ {\r
+ private const string TAG = "Components";\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ Tizen.Log.Info(TAG, "Init() is called!");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ Tizen.Log.Info(TAG, "Destroy() is called!");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Test PageAppearingEventArgs empty constructor. Check it has been triggered")]\r
+ [Property("SPEC", "Tizen.NUI.Components.PageAppearingEventArgs.PageAppearingEventArgs C")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "CONSTR")]\r
+ [Property("COVPARAM", "")]\r
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]\r
+ public void PageAppearingEventArgs_CHECK_VALUE()\r
+ {\r
+ /* TEST CODE */\r
+ var pageAppearingEventArgs = new PageAppearingEventArgs();\r
+ Assert.IsNotNull(pageAppearingEventArgs, "Should be not null!");\r
+ Assert.IsInstanceOf<PageAppearingEventArgs>(pageAppearingEventArgs, "Should be equal!");\r
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+using System;\r
+using Tizen.NUI;\r
+using Tizen.NUI.Components;\r
+using System.Runtime.InteropServices;\r
+using System.Threading.Tasks;\r
+using Tizen.NUI.Components.Test;\r
+\r
+namespace Tizen.NUI.Components.Tests\r
+{\r
+ [TestFixture]\r
+ [Description("Tizen.NUI.Components.PageDisappearedEventArgs Tests")]\r
+ public class PageDisappearedEventArgsTests\r
+ {\r
+ private const string TAG = "Components";\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ Tizen.Log.Info(TAG, "Init() is called!");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ Tizen.Log.Info(TAG, "Destroy() is called!");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Test PageDisappearedEventArgs empty constructor. Check it has been triggered")]\r
+ [Property("SPEC", "Tizen.NUI.Components.PageDisappearedEventArgs.PageDisappearedEventArgs C")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "CONSTR")]\r
+ [Property("COVPARAM", "")]\r
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]\r
+ public void PageDisappearedEventArgs_CHECK_VALUE()\r
+ {\r
+ /* TEST CODE */\r
+ var pageDisappearedEventArgs = new PageDisappearedEventArgs();\r
+ Assert.IsNotNull(pageDisappearedEventArgs, "Should be not null!");\r
+ Assert.IsInstanceOf<PageDisappearedEventArgs>(pageDisappearedEventArgs, "Should be equal!");\r
+\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+using System;\r
+using Tizen.NUI;\r
+using Tizen.NUI.Components;\r
+using System.Runtime.InteropServices;\r
+using System.Threading.Tasks;\r
+using Tizen.NUI.Components.Test;\r
+\r
+namespace Tizen.NUI.Components.Tests\r
+{\r
+ [TestFixture]\r
+ [Description("Tizen.NUI.Components.PageDisappearingEventArgs Tests")]\r
+ public class PageDisappearingEventArgsTests\r
+ {\r
+ private const string TAG = "Components";\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ Tizen.Log.Info(TAG, "Init() is called!");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ Tizen.Log.Info(TAG, "Destroy() is called!");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Test PageDisappearingEventArgs empty constructor. Check it has been triggered")]\r
+ [Property("SPEC", "Tizen.NUI.Components.PageDisappearingEventArgs.PageDisappearingEventArgs C")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "CONSTR")]\r
+ [Property("COVPARAM", "")]\r
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]\r
+ public void PageDisappearingEventArgs_CHECK_VALUE()\r
+ {\r
+ /* TEST CODE */\r
+ var pageDisappearingEventArgs = new PageDisappearingEventArgs();\r
+ Assert.IsNotNull(pageDisappearingEventArgs, "Should be not null!");\r
+ Assert.IsInstanceOf<PageDisappearingEventArgs>(pageDisappearingEventArgs, "Should be equal!");\r
+\r
+ }\r
+ }\r
+}\r