namespace Tizen.ComponentBased.Tests
{
+ public class TestEFLWindow : EFLWindowInfo
+ {
+ public TestEFLWindow(Window win) : base(win)
+ {
+ }
+ public void DoDispose(bool disposing)
+ {
+ Dispose(disposing);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
+ }
+ }
[TestFixture]
[Description("EFLWindowInfo Class Tests")]
Assert.IsInstanceOf<EFLWindowInfo>(info, "Should return EFLWindowInfo.");
Assert.GreaterOrEqual(info.ResourceId, 0);
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test : Disposes window of the EFLWindowInfo.")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLWindowInfo.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ public void Dispose_Released_Value()
+ {
+ var window = new Window("test");
+ Assert.NotNull(window, "Should not return NULL");
+ Assert.IsInstanceOf<Window>(window, "Should return Window.");
+
+ var info = new EFLWindowInfo(window);
+ Assert.NotNull(info, "Should not return NULL");
+ Assert.IsInstanceOf<EFLWindowInfo>(info, "Should return EFLWindowInfo.");
+
+ info.Dispose();
+ Assert.IsFalse(window.IsRealized, "Should return False.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test : Disposes window of the EFLWindowInfo with parameter.")]
+ [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLWindowInfo.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
+ [Property("COVPARAM", "bool")]
+ public void Dispose_WITH_PARAM()
+ {
+ var window = new Window("test");
+ Assert.NotNull(window, "Should not return NULL");
+ Assert.IsInstanceOf<Window>(window, "Should return Window.");
+
+ var info = new TestEFLWindow(window);
+ Assert.NotNull(info, "Should not return NULL");
+ Assert.IsInstanceOf<TestEFLWindow>(info, "Should return TestEFLWindow.");
+
+ info.DoDispose(false);
+ Assert.IsTrue(window.IsRealized, "Should return TRUE.");
+
+ var window2 = new Window("test");
+ Assert.NotNull(window2, "Should not return NULL");
+ Assert.IsInstanceOf<Window>(window2, "Should return Window.");
+
+ var info2 = new TestEFLWindow(window2);
+ Assert.NotNull(info2, "Should not return NULL");
+ Assert.IsInstanceOf<TestEFLWindow>(info2, "Should return TestEFLWindow.");
+
+ info2.DoDispose(true);
+ Assert.IsFalse(window2.IsRealized, "Should return FALSE.");
+ }
}
}