From: hyunho Date: Wed, 18 Sep 2019 09:21:13 +0000 (+0900) Subject: [Tizen.Applications][TCSACR-260][Add SuspendedState Event] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae953ed57ec4e28b7cb8a9ce7380712d9b509ecd;p=test%2Ftct%2Fcsharp%2Fapi.git [Tizen.Applications][TCSACR-260][Add SuspendedState Event] Change-Id: I077f6863a092e25908d2d824499122150e5b568d Signed-off-by: hyunho --- diff --git a/tct-suite-vs/Tizen.Applications.Tests/testcase/TSSuspendedStateEventArgs.cs b/tct-suite-vs/Tizen.Applications.Tests/testcase/TSSuspendedStateEventArgs.cs new file mode 100644 index 0000000..f4dd40d --- /dev/null +++ b/tct-suite-vs/Tizen.Applications.Tests/testcase/TSSuspendedStateEventArgs.cs @@ -0,0 +1,61 @@ +using NUnit.Framework; +using NUnit.Framework.TUnit; + +namespace Tizen.Applications.Tests +{ + [TestFixture] + [Description("Tizen.Applications.SuspendedStateEventArgs Tests")] + class SuspendedStateEventArgsTests + { + [SetUp] + public void Init() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); + } + + [TearDown] + public void Destroy() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST"); + } + + [Test] + [Category("P1")] + [Description("Create a SuspendedStateEventArgs which will be used by applications")] + [Property("SPEC", "Tizen.Applications.SuspendedStateEventArgs.SuspendedStateEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "hhstark.kang, hhstark.kang@samsung.com")] + public void SuspendedStateEventArgs_INIT() + { + /* TEST CODE */ + var exitSuspendedArg = new SuspendedStateEventArgs(SuspendedState.DidExit); + Assert.IsNotNull(exitSuspendedArg, "SuspendedStateEventArgs should be not null after init"); + Assert.IsInstanceOf(exitSuspendedArg, "Should return SuspendedStateEventArgs."); + + var enterSuspendedArg = new SuspendedStateEventArgs(SuspendedState.WillEnter); + Assert.IsNotNull(enterSuspendedArg, "SuspendedStateEventArgs should be not null after init"); + Assert.IsInstanceOf(enterSuspendedArg, "Should return SuspendedStateEventArgs."); + } + + [Test] + [Category("P1")] + [Description("Test : Gets SuspendedState of the SuspendedStateEventArgs")] + [Property("SPEC", "Tizen.Applications.SuspendedStateEventArgs.SuspendedState A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + public void SuspendedState_Get_Value() + { + var exitSuspendedArg = new SuspendedStateEventArgs(SuspendedState.DidExit); + Assert.IsNotNull(exitSuspendedArg, "SuspendedStateEventArgs should be not null after init"); + Assert.IsInstanceOf(exitSuspendedArg, "Should return SuspendedStateEventArgs."); + Assert.AreEqual(exitSuspendedArg.SuspendedState, SuspendedState.DidExit, "SuspendedState value is not correct"); + + var enterSuspendedArg = new SuspendedStateEventArgs(SuspendedState.WillEnter); + Assert.IsNotNull(enterSuspendedArg, "SuspendedStateEventArgs should be not null after init"); + Assert.IsInstanceOf(enterSuspendedArg, "Should return SuspendedStateEventArgs."); + Assert.AreEqual(enterSuspendedArg.SuspendedState, SuspendedState.WillEnter, "SuspendedState value is not correct"); + } + } +}