{
tlog.Debug(tag, $"TransitionItemConstructor START");
- View currentView = new View()
+ using (View view = new View())
{
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionItem(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
- View newView = new View()
- {
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
-
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- newView.Dispose();
- currentView.Dispose();
- timePeriod.Dispose();
- alphaFunction.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItem ShowSourceAfterFinished.")]
- [Property("SPEC", "Tizen.NUI.TransitionItem.ShowSourceAfterFinished A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PROW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemShowSourceAfterFinished()
- {
- tlog.Debug(tag, $"TransitionItemShowSourceAfterFinished START");
-
- View currentView = new View()
- {
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
-
- View newView = new View()
- {
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
-
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- try
- {
- testingTarget.ShowSourceAfterFinished = true;
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
+ testingTarget.Dispose();
}
-
- newView.Dispose();
- currentView.Dispose();
- timePeriod.Dispose();
- alphaFunction.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemShowSourceAfterFinished END (OK)");
+
+ tlog.Debug(tag, $"TransitionItemConstructor END (OK)");
}
[Test]
{
tlog.Debug(tag, $"TransitionItemAssign START");
- View currentView = new View()
- {
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
-
- View newView = new View()
- {
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
-
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- using (TransitionItem rhs = new TransitionItem(testingTarget))
- {
- var result = testingTarget.Assign(rhs);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(result, "Should be an Instance of TransitionItem!");
- }
-
- currentView?.Dispose();
- newView?.Dispose();
- timePeriod?.Dispose();
- alphaFunction?.Dispose();
- testingTarget?.Dispose();
- tlog.Debug(tag, $"TransitionItemAssign END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItem Dispose.")]
- [Property("SPEC", "Tizen.NUI.TransitionItem.Dispose M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemDispose()
- {
- tlog.Debug(tag, $"TransitionItemDispose START");
-
- View currentView = new View()
- {
- Name = "currentPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- currentView.TransitionOptions.TransitionTag = "Transition";
- currentView.TransitionOptions.EnableTransition = true;
-
- View newView = new View()
+ using (View view = new View())
{
- Name = "newPage",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- newView.TransitionOptions.TransitionTag = "Transition";
- newView.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionItem(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
+
+ try
+ {
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
- AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default);
- TimePeriod timePeriod = new TimePeriod(500);
-
- var testingTarget = new TransitionItem(currentView, newView, timePeriod, alphaFunction);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!");
-
- try
- {
testingTarget.Dispose();
}
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
- currentView?.Dispose();
- newView?.Dispose();
- timePeriod?.Dispose();
- alphaFunction?.Dispose();
- tlog.Debug(tag, $"TransitionItemDispose END (OK)");
+ tlog.Debug(tag, $"TransitionItemAssign END (OK)");
}
}
}
{
tlog.Debug(tag, $"TransitionItemBaseConstructor START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseConstructor END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase Duration.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.Duration A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseDuration()
- {
- tlog.Debug(tag, $"TransitionItemBaseDuration START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
-
- testingTarget.Duration = 300;
- Assert.IsTrue(300 == testingTarget.Duration);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseDuration END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase Delay.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.Delay A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseDelay()
- {
- tlog.Debug(tag, $"TransitionItemBaseDelay START");
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
+ testingTarget.Dispose();
}
- testingTarget.Delay = 300;
- Assert.IsTrue(300 == testingTarget.Delay);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseDelay END (OK)");
+ tlog.Debug(tag, $"TransitionItemBaseConstructor END (OK)");
}
[Test]
{
tlog.Debug(tag, $"TransitionItemBaseTimePeriod START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
- try
- {
- using (TimePeriod setValue = new TimePeriod(300))
- {
- testingTarget.TimePeriod = setValue;
- }
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
+ testingTarget.TimePeriod = new TimePeriod(300);
+ tlog.Debug(tag, "TiemPeriod : " + testingTarget.TimePeriod);
+
+ testingTarget.Dispose();
}
- view.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionItemBaseTimePeriod END (OK)");
}
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase AlphaFunction.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.AlphaFunction A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseAlphaFunction()
- {
- tlog.Debug(tag, $"TransitionItemBaseAlphaFunction START");
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionItemBase AlphaFunction.")]
+ //[Property("SPEC", "Tizen.NUI.TransitionItemBase.AlphaFunction A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionItemBaseAlphaFunction()
+ //{
+ // tlog.Debug(tag, $"TransitionItemBaseAlphaFunction START");
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
- }
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
- using (AlphaFunction setValue = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut))
- {
- testingTarget.AlphaFunction = setValue;
- var result = testingTarget.AlphaFunction;
- Assert.IsTrue(result.GetBuiltinFunction() == AlphaFunction.BuiltinFunctions.EaseOut);
- }
+ // testingTarget.AlphaFunction = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut);
+ // tlog.Debug(tag, "AlphaFunction : " + testingTarget.AlphaFunction.ToString());
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseAlphaFunction END (OK)");
- }
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"TransitionItemBaseAlphaFunction END (OK)");
+ //}
[Test]
[Category("P1")]
{
tlog.Debug(tag, $"TransitionItemBaseTransitionWithChild START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
+
+ try
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.TransitionWithChild = false;
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
- }
- try
- {
- testingTarget.TransitionWithChild = true;
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
+ testingTarget.Dispose();
}
- view.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionItemBaseTransitionWithChild END (OK)");
}
{
tlog.Debug(tag, $"TransitionItemBaseDownCast START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
+
+ try
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ TransitionItemBase.DownCast(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
- }
- var result = TransitionItemBase.DownCast(testingTarget);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItemBase>(result, "Should be an Instance of TransitionItemBase!");
+ testingTarget.Dispose();
+ }
- view.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionItemBaseDownCast END (OK)");
}
{
tlog.Debug(tag, $"TransitionItemBaseAssign START");
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
+ using (View view = new View())
{
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ var testingTarget = new TransitionItemBase(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionItemBase>(testingTarget, "Should be an Instance of TransitionItemBase!");
+
+ try
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.Assign(testingTarget);
}
- }
-
- using (TransitionItemBase rhs = new TransitionItemBase(testingTarget))
- {
- var result = testingTarget.Assign(rhs);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItemBase>(result, "Should be an Instance of TransitionItemBase!");
- }
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseAssign END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionItemBase Dispose.")]
- [Property("SPEC", "Tizen.NUI.TransitionItemBase.Dispose M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionItemBaseDispose()
- {
- tlog.Debug(tag, $"TransitionItemBaseDispose START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase testingTarget = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ catch (Exception e)
{
- testingTarget = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
- }
- try
- {
testingTarget.Dispose();
}
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
- view?.Dispose();
- tlog.Debug(tag, $"TransitionItemBaseDispose END (OK)");
+ tlog.Debug(tag, $"TransitionItemBaseAssign END (OK)");
}
}
}
tlog.Debug(tag, $"TransitionSetAddTransition END (OK)");
}
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionSet Finished.")]
+ //[Property("SPEC", "Tizen.NUI.TransitionSet.Finished A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionSetFinished()
+ //{
+ // tlog.Debug(tag, $"TransitionSetFinished START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
+
+ // testingTarget.Finished += MyOnFinished;
+ // testingTarget.Finished -= MyOnFinished;
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"TransitionSetFinished END (OK)");
+ //}
+
+ //private void MyOnFinished(object sender, EventArgs e) { }
+
[Test]
[Category("P1")]
[Description("TransitionSet GetTransitionAt.")]
{
tlog.Debug(tag, $"TransitionSetGetTransitionAt START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.GetTransitionAt(0);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var result = testingTarget.GetTransitionAt(1);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionItemBase>(result, "Should be an Instance of TransitionItemBase!");
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetGetTransitionAt END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetGetTransitionCount START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.GetTransitionCount();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var result = testingTarget.GetTransitionCount();
- Assert.IsTrue(1 == result);
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetGetTransitionCount END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetPlay START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.Play();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- try
- {
- testingTarget.Play();
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetPlay END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetAssign START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.Assign(testingTarget);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var transitionSet = new TransitionSet();
- Assert.IsNotNull(transitionSet, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(transitionSet, "Should be an Instance of TransitionSet!");
-
- transitionSet.AddTransition(transitionItemBase);
-
- var testingTarget = new TransitionSet();
- var result = transitionSet.Assign(testingTarget);
- Assert.IsNotNull(result, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(result, "Should be an Instance of TransitionSet!");
-
- view.Dispose();
- transitionItemBase.Dispose();
- testingTarget.Dispose();
tlog.Debug(tag, $"TransitionSetAssign END (OK)");
}
{
tlog.Debug(tag, $"TransitionSetFinishedSignal START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSet(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ testingTarget.FinishedSignal();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
}
}
- var transitionSet = new TransitionSet();
- Assert.IsNotNull(transitionSet, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(transitionSet, "Should be an Instance of TransitionSet!");
-
- transitionSet.AddTransition(transitionItemBase);
-
- var testingTarget = transitionSet.FinishedSignal();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSet!");
-
- view.Dispose();
- transitionItemBase.Dispose();
tlog.Debug(tag, $"TransitionSetFinishedSignal END (OK)");
}
-
-
- [Test]
- [Category("P1")]
- [Description("TransitionSet Dispose.")]
- [Property("SPEC", "Tizen.NUI.TransitionSet.Dispose M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetDispose()
- {
- tlog.Debug(tag, $"TransitionSetDispose START");
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- try
- {
- testingTarget.Dispose();
- }
- catch (Exception e)
- {
- tlog.Error(tag, "Caught Exception" + e.ToString());
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
-
- tlog.Debug(tag, $"TransitionSetDispose END (OK)");
- }
}
}
[Test]
[Category("P1")]
- [Description("TransitionSetSignal Empty.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Empty M")]
+ [Description("TransitionSetSignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.TransitionSetSignal.TransitionSetSignal M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalEmpty()
+ public void TransitionSetSignalConstructor()
{
- tlog.Debug(tag, $"TransitionSetSignalEmpty START");
+ tlog.Debug(tag, $"TransitionSetSignalConstructor START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
+ testingTarget.Dispose();
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- var result = transitionSetSignal.Empty();
- Assert.IsTrue(result);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalEmpty END (OK)");
+ tlog.Debug(tag, $"TransitionSetSignalConstructor END (OK)");
}
[Test]
[Category("P1")]
- [Description("TransitionSetSignal GetConnectionCount.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.GetConnectionCount M")]
+ [Description("TransitionSetSignal Empty.")]
+ [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Empty M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalGetConnectionCount()
+ public void TransitionSetSignalEmpty()
{
- tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount START");
+ tlog.Debug(tag, $"TransitionSetSignalEmpty START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, "Empty : " + testingTarget.Empty());
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- var result = transitionSetSignal.GetConnectionCount();
- Assert.IsTrue(0 == result);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionSetSignal Connect.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalConnect()
- {
- tlog.Debug(tag, $"TransitionSetSignalConnect START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ catch (Exception e)
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- dummyCallback callback = OnDummyCallback;
- transitionSetSignal.Connect(callback);
- transitionSetSignal.Disconnect(callback);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalConnect END (OK)");
- }
- [Test]
- [Category("P1")]
- [Description("TransitionSetSignal Connect. With IntPtr")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalConnectWithIntPtr()
- {
- tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
- {
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
- }
+ testingTarget.Dispose();
}
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- transitionSetSignal.Connect(OnIntPtrCallback);
- transitionSetSignal.Disconnect(OnIntPtrCallback);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr END (OK)");
+ tlog.Debug(tag, $"TransitionSetSignalEmpty END (OK)");
}
[Test]
[Category("P1")]
- [Description("TransitionSetSignal Disconnect.")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Disconnect M")]
+ [Description("TransitionSetSignal GetConnectionCount.")]
+ [Property("SPEC", "Tizen.NUI.TransitionSetSignal.GetConnectionCount M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalDisconnect()
+ public void TransitionSetSignalGetConnectionCount()
{
- tlog.Debug(tag, $"TransitionSetSignalDisconnect START");
+ tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount START");
- View view = new View()
+ using (View view = new View())
{
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
+ var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ try
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, "ConnectionCount : " + testingTarget.GetConnectionCount());
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
-
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- dummyCallback callback = OnDummyCallback;
- transitionSetSignal.Connect(callback);
- transitionSetSignal.Disconnect(callback);
-
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalDisconnect END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("TransitionSetSignal Disconnect. With IntPtr")]
- [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Disconnect M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void TransitionSetSignalDisconnectWithIntPtr()
- {
- tlog.Debug(tag, $"TransitionSetSignalDisconnectWithIntPtr START");
-
- View view = new View()
- {
- Name = "view",
- TransitionOptions = new TransitionOptions(Window.Instance)
- };
- view.TransitionOptions.TransitionTag = "Transition";
- view.TransitionOptions.EnableTransition = true;
-
- TransitionItemBase transitionItemBase = null;
- using (TimePeriod timePeriod = new TimePeriod(500))
- {
- using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default))
+ catch (Exception e)
{
- transitionItemBase = new TransitionItemBase(view, true, timePeriod, alphaFunction);
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
- }
-
- var testingTarget = new TransitionSet();
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf<TransitionSet>(testingTarget, "Should be an Instance of TransitionSet!");
- testingTarget.AddTransition(transitionItemBase);
-
- var transitionSetSignal = testingTarget.FinishedSignal();
- Assert.IsNotNull(transitionSetSignal, "Should be not null!");
- Assert.IsInstanceOf<TransitionSetFinishedSignal>(transitionSetSignal, "Should be an Instance of TransitionSet!");
-
- transitionSetSignal.Connect(OnIntPtrCallback);
- transitionSetSignal.Disconnect(OnIntPtrCallback);
+ testingTarget.Dispose();
+ }
- view.Dispose();
- testingTarget.Dispose();
- tlog.Debug(tag, $"TransitionSetSignalDisconnectWithIntPtr END (OK)");
+ tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount END (OK)");
}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionSetSignal Connect.")]
+ //[Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionSetSignalConnect()
+ //{
+ // tlog.Debug(tag, $"TransitionSetSignalConnect START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
+
+ // try
+ // {
+ // dummyCallback callback = OnDummyCallback;
+ // testingTarget.Connect(callback);
+ // testingTarget.Disconnect(callback);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"TransitionSetSignalConnect END (OK)");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("TransitionSetSignal Connect. With IntPtr")]
+ //[Property("SPEC", "Tizen.NUI.TransitionSetSignal.Connect M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //[Property("AUTHOR", "guowei.wang@samsung.com")]
+ //public void TransitionSetSignalConnectWithIntPtr()
+ //{
+ // tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr START");
+
+ // using (View view = new View())
+ // {
+ // var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
+ // Assert.IsNotNull(testingTarget, "Should be not null!");
+ // Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
+
+ // try
+ // {
+ // testingTarget.Connect(view.SwigCPtr.Handle);
+ // testingTarget.Disconnect(view.SwigCPtr.Handle);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"TransitionSetSignalConnectWithIntPtr END (OK)");
+ //}
}
}
+++ /dev/null
-using NUnit.Framework;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/DefaultTheme")]
- internal class PublicDefaultThemeTest
- {
- private const string tag = "NUITEST";
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("DefaultThemeCreator GetExternalThemeKeyListSet")]
- [Property("SPEC", "Tizen.NUI.DefaultThemeCreator.GetExternalThemeKeyListSet M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void DefaultThemeCreatorGetExternalThemeKeyListSet()
- {
- tlog.Debug(tag, $"DefaultThemeCreatorGetExternalThemeKeyListSet START");
-
- DefaultThemeCreator.Instance.GetExternalThemeKeyListSet();
-
- tlog.Debug(tag, $"DefaultThemeCreatorGetExternalThemeKeyListSet END (OK)");
- Assert.Pass("DefaultThemeCreatorGetExternalThemeKeyListSet");
- }
- }
-
-}
-
+++ /dev/null
-using NUnit.Framework;
-using System.Collections.Generic;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/DictionaryExternalTheme")]
- internal class PublicDictionaryExternalThemeTest
- {
- private const string tag = "NUITEST";
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
-
- [Test]
- [Category("P1")]
- [Description("Create a DictionaryExternalTheme object.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.DictionaryExternalTheme C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeConstructor()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeConstructor START");
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
-
- tlog.Debug(tag, $"DictionaryExternalThemeConstructor END (OK)");
- Assert.Pass("DictionaryExternalThemeConstructor");
- }
-
- [Test]
- [Category("P1")]
- [Description("test DictionaryExternalTheme Id.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.Id A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeId()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeId START");
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
- string b1 = a1.Id;
-
- tlog.Debug(tag, $"DictionaryExternalThemeId END (OK)");
- Assert.Pass("DictionaryExternalThemeId");
- }
-
- [Test]
- [Category("P1")]
- [Description("test DictionaryExternalTheme Version.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.Version A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeVersion()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeVersion START");
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
- string b1 = a1.Version;
-
- tlog.Debug(tag, $"DictionaryExternalThemeVersion END (OK)");
- Assert.Pass("DictionaryExternalThemeVersion");
- }
-
- [Test]
- [Category("P1")]
- [Description("test DictionaryExternalTheme GetValue.")]
- [Property("SPEC", "Tizen.NUI.DictionaryExternalTheme.GetValue M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void DictionaryExternalThemeGetValue()
- {
- tlog.Debug(tag, $"DictionaryExternalThemeGetValue START");
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
- string b1 = a1.GetValue("aaa");
-
- tlog.Debug(tag, $"DictionaryExternalThemeGetValue END (OK)");
- Assert.Pass("DictionaryExternalThemeGetValue");
- }
- }
-}
+++ /dev/null
-using NUnit.Framework;
-using System;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/ExternalThemeKeyList")]
- internal class PublicExternalThemeKeyListTest
- {
- private const string tag = "NUITEST";
- private readonly object viewStyle;
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("Create a ExternalThemeKeyList object.")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.ExternalThemeKeyList C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeKeyListConstructor()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListConstructor START");
-
- Type componentType = typeof(string);
- Type styleType = typeof(string);
- ExternalThemeKeyList a1 = new ExternalThemeKeyList(componentType, styleType);
-
- tlog.Debug(tag, $"ExternalThemeKeyListConstructor END (OK)");
- Assert.Pass("ExternalThemeKeyListConstructor");
- }
-
- [Test]
- [Category("P1")]
- [Description("ExternalThemeKeyList add")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.add M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void ExternalThemeKeyListadd()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListadd START");
-
- ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- keyList.Add<Size>("/Size", (ViewStyle style, Size value) => style.Size = value);
- tlog.Debug(tag, $"ExternalThemeKeyListadd END (OK)");
- Assert.Pass("ExternalThemeKeyListadd");
- }
-
- [Test]
- [Category("P1")]
- [Description("ExternalThemeKeyList AddSelector")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.AddSelector M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void ExternalThemeKeyListAddSelector()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListAddSelector START");
-
- ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- keyList.AddSelector<Color>("/Pickers/ItemTextLabel/TextColor", (ViewStyle style, Selector<Color> value) => ((TimePickerStyle)style).Pickers.ItemTextLabel.TextColor = value, ControlState.Selected);
-
- tlog.Debug(tag, $"ExternalThemeKeyListAddSelector END (OK)");
- Assert.Pass("ExternalThemeKeyListAddSelector");
- }
-
- [Test]
- [Category("P1")]
- [Description("ExternalThemeKeyList AddBackgroundSelector")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.AddBackgroundSelector M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void ExternalThemeKeyListAddBackgroundSelector()
- {
- tlog.Debug(tag, $"ExternalThemeKeyListAddBackgroundSelector START");
-
- ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- keyList.AddBackgroundSelector("/Background", mySetBackgroundColor, mySetBackgroundImage);
-
- tlog.Debug(tag, $"ExternalThemeKeyListAddBackgroundSelector END (OK)");
- Assert.Pass("ExternalThemeKeyListAddBackgroundSelector");
- }
-
- private static void mySetBackgroundColor(ViewStyle style, Selector<Color> value)
- {
- style.BackgroundColor = value;
- }
-
- private static void mySetBackgroundImage(ViewStyle style, Selector<string> value)
- {
- style.BackgroundImage = value;
- }
-
- //[Test]
- //[Category("P1")]
- //[Description("ExternalThemeKeyList ApplyKeyActions")]
- //[Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.ApplyKeyActions M")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "MR")]
- //public void ExternalThemeKeyListApplyKeyActions()
- //{
- // tlog.Debug(tag, $"ExternalThemeKeyListApplyKeyActions START");
-
- // ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
-
- // Tizen.Applications.ThemeManager.Theme theme();
- // TizenExternalTheme externalTheme = new TizenExternalTheme();
- // Theme theme = new Theme();
- // keyList.ApplyKeyActions(externalTheme, theme);
-
- // tlog.Debug(tag, $"ExternalThemeKeyListApplyKeyActions END (OK)");
- // Assert.Pass("ExternalThemeKeyListApplyKeyActions");
- //}
- }
-}
-
-using NUnit.Framework;
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
using System.Collections.Generic;
namespace Tizen.NUI.Devel.Tests
internal class PublicExternalThemeManagerTest
{
private const string tag = "NUITEST";
+ private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
[SetUp]
public void Init()
{
tlog.Debug(tag, $"ExternalThemeManagerSharedResourcePath START");
- string b1 = ExternalThemeManager.SharedResourcePath;
-
- ExternalThemeManager.Initialize();
- b1 = ExternalThemeManager.SharedResourcePath;
+ ExternalThemeManager.SharedResourcePath = path;
+ Assert.AreEqual(path, ExternalThemeManager.SharedResourcePath, "Should be equal!");
tlog.Debug(tag, $"ExternalThemeManagerSharedResourcePath END (OK)");
- Assert.Pass("ExternalThemeManagerSharedResourcePath");
}
[Test]
tlog.Debug(tag, $"ExternalThemeManagerInitialize END (OK)");
Assert.Pass("ExternalThemeManagerInitialize");
}
-
- [Test]
- [Category("P1")]
- [Description("test ExternalThemeManager GetCurrentTheme")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeManager.GetCurrentTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeManagerGetCurrentTheme()
- {
- tlog.Debug(tag, $"ExternalThemeManagerGetCurrentTheme START");
-
- ExternalThemeManager.GetCurrentTheme();
-
- tlog.Debug(tag, $"ExternalThemeManagerGetCurrentTheme END (OK)");
- Assert.Pass("ExternalThemeManagerGetCurrentTheme");
- }
-
- [Test]
- [Category("P1")]
- [Description("test ExternalThemeManager GetTheme")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeManager.GetTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeManagerGetTheme()
- {
- tlog.Debug(tag, $"ExternalThemeManagerGetTheme START");
-
- ExternalThemeManager.GetTheme("aaa");
-
- tlog.Debug(tag, $"ExternalThemeManagerGetTheme END (OK)");
- Assert.Pass("ExternalThemeManagerGetTheme");
- }
-
- [Test]
- [Category("P1")]
- [Description("test ExternalThemeManager SetTestTheme")]
- [Property("SPEC", "Tizen.NUI.ExternalThemeManager.SetTestTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ExternalThemeManagerSetTestTheme()
- {
- tlog.Debug(tag, $"ExternalThemeManagerSetTestTheme START");
-
- ExternalThemeManager.SetTestTheme(null);
-
- string id = "id1"; string version = "version1";
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);
-
- ExternalThemeManager.SetTestTheme(a1);
- ExternalThemeManager.SetTestTheme(id, version, theme);
-
- tlog.Debug(tag, $"ExternalThemeManagerSetTestTheme END (OK)");
- Assert.Pass("ExternalThemeManagerSetTestTheme");
- }
}
}
\ No newline at end of file
}
[Test]
- [Category("P1")]
- [Description("Create a Theme object.")]
+ [Category("P2")]
+ [Description("Theme construcotr. xaml file path is null.")]
[Property("SPEC", "Tizen.NUI.Theme.Theme C")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "")]
- public void ThemeConstructor()
+ public void ThemeConstructorWithUnavailablePath()
{
- tlog.Debug(tag, $"ThemeConstructor START");
-
- Theme a1 = new Theme("");
- Theme b1 = new Theme("/root/noexist.xml");
- Theme C1 = new Theme("/etc/info.ini");
+ tlog.Debug(tag, $"ThemeConstructorWithUnavailablePath START");
- tlog.Debug(tag, $"ThemeConstructor END (OK)");
- Assert.Pass("ThemeConstructor");
+ try
+ {
+ Theme a1 = new Theme("");
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ThemeConstructorWithUnavailablePath END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
+ }
}
[Test]
Assert.Pass("ThemeResources");
}
- //[Test]
- //[Category("P1")]
- //[Description("test Theme this .")]
- //[Property("SPEC", "Tizen.NUI.Theme.this A")]
- //[Property("SPEC_URL", "-")]
- //[Property("CRITERIA", "PRW")]
- //[Property("COVPARAM", "")]
- //public void Themethis()
- //{
- // tlog.Debug(tag, $"Themethis START");
- // Theme a1 = new Theme();
-
- // ViewStyle b1 = a1.styleName;
-
- // tlog.Debug(tag, $"Themethis END (OK)");
- // Assert.Pass("Themethis");
- //}
-
[Test]
[Category("P1")]
[Description("test Theme Clear .")]
[Test]
[Category("P1")]
- [Description("test Theme AddStyle .")]
- [Property("SPEC", "Tizen.NUI.Theme.AddStyle M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeAddStyle()
- {
- tlog.Debug(tag, $"ThemeAddStyle START");
- Theme a1 = new Theme();
-
- ViewStyle v1 = new ViewStyle();
- a1.AddStyle("red", v1);
-
- a1.AddStyle(null, v1);
-
- tlog.Debug(tag, $"ThemeAddStyle END (OK)");
- Assert.Pass("ThemeAddStyle");
- }
-
- [Test]
- [Category("P1")]
[Description("test Theme Clone .")]
[Property("SPEC", "Tizen.NUI.Theme.Clone M")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
- [Description("test Theme Merge .")]
+ [Description("Theme Merge .")]
[Property("SPEC", "Tizen.NUI.Theme.Merge M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
public void ThemeMerge()
{
tlog.Debug(tag, $"ThemeMerge START");
+
+ ViewStyle style = new ViewStyle()
+ {
+ Size = new Size2D(100, 30),
+ Focusable = true
+ };
Theme a1 = new Theme();
+ a1.Version = "0.1";
+ a1.AddStyle("myStyle", style);
- a1.Merge("./opt/etc/skel/apps_rw/mobilebff/tizen-manifest.xml");
+ ViewStyle style1 = new ViewStyle()
+ {
+ Margin = new Extents(4, 2, 3, 7)
+ };
Theme t1 = new Theme();
- a1.Merge(t1);
+ t1.Id = "t1";
+ t1.Version = "1.0";
+ t1.AddStyle("myStyle", style1);
- Theme t2 = null;
- a1.Merge(t2);
+ try
+ {
+ a1.Merge(t1);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
tlog.Debug(tag, $"ThemeMerge END (OK)");
- Assert.Pass("ThemeMerge");
}
[Test]
- [Category("P1")]
- [Description("test Theme MergeWithoutClone .")]
- [Property("SPEC", "Tizen.NUI.Theme.MergeWithoutClone M")]
+ [Category("P2")]
+ [Description("Theme Merge. Parameter is null.")]
+ [Property("SPEC", "Tizen.NUI.Theme.Merge M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "")]
- public void ThemeMergeWithoutClone()
+ public void ThemeMergeWithNullParameter()
{
- tlog.Debug(tag, $"ThemeMergeWithoutClone START");
+ tlog.Debug(tag, $"ThemeMergeWithNullParameter START");
Theme a1 = new Theme();
Theme b1 = new Theme();
Theme t2 = null;
- a1.Merge(t2);
+ try
+ {
+ a1.Merge(t2);
+ }
+ catch (ArgumentNullException e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"ThemeMergeWithNullParameter END (OK)");
+ Assert.Pass("Caught ArgumentNullException: Passed!");
+ }
+
string tmp = a1.Id;
a1.Id = null;
tmp = a1.Version;
a1.Version = null;
a1.Merge(b1);
-
- tlog.Debug(tag, $"ThemeMergeWithoutClone END (OK)");
- Assert.Pass("ThemeMergeWithoutClone");
}
[Test]
- [Category("P1")]
- [Description("test Theme ApplyExternalTheme .")]
- [Property("SPEC", "Tizen.NUI.Theme.ApplyExternalTheme M")]
+ [Category("P2")]
+ [Description("Theme Merge. Id is null.")]
+ [Property("SPEC", "Tizen.NUI.Theme.Merge M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "")]
- public void ThemeApplyExternalTheme()
+ public void ThemeMergeWithNullId()
{
- tlog.Debug(tag, $"ThemeApplyExternalTheme START");
+ tlog.Debug(tag, $"ThemeMergeWithNullId START");
Theme a1 = new Theme();
Theme b1 = new Theme();
- Dictionary<string, string> theme = new Dictionary<string, string>
- {
- { "aaa", "111" },
- { "bbb", "222" }
- };
-
- DictionaryExternalTheme c1 = new DictionaryExternalTheme("myid", "myversion", theme);
+ a1.Id = null;
+ a1.Merge(b1);
+ Assert.AreEqual(a1.Id, b1.Id, "Should be equal!");
- Type componentType = typeof(string);
- Type styleType = typeof(string);
- ExternalThemeKeyList e1 = new ExternalThemeKeyList(componentType, styleType);
+ tlog.Debug(tag, $"ThemeMergeWithNullId END (OK)");
+ }
- HashSet<ExternalThemeKeyList> keyListSet = new HashSet<ExternalThemeKeyList>
- {
- e1
- };
+ [Test]
+ [Category("P2")]
+ [Description("Theme Merge. Version is null.")]
+ [Property("SPEC", "Tizen.NUI.Theme.Merge M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("COVPARAM", "")]
+ public void ThemeMergeWithNullVersion()
+ {
+ tlog.Debug(tag, $"ThemeMergeWithNullVersion START");
+ Theme a1 = new Theme();
+ Theme b1 = new Theme();
- a1.ApplyExternalTheme(c1, keyListSet);
- a1.ApplyExternalTheme(c1, null);
+ a1.Version = null;
+ a1.Merge(b1);
+ Assert.AreEqual(a1.Version, b1.Version, "Should be equal!");
- tlog.Debug(tag, $"ThemeApplyExternalTheme END (OK)");
- Assert.Pass("ThemeApplyExternalTheme");
+ tlog.Debug(tag, $"ThemeMergeWithNullVersion END (OK)");
}
[Test]
{
tlog.Debug(tag, $"ThemeHasSameIdAndVersion START");
Theme a1 = new Theme();
- a1.HasSameIdAndVersion(null);
+ a1.HasSameIdAndVersion("themeid", "1.0");
tlog.Debug(tag, $"ThemeHasSameIdAndVersion END (OK)");
Assert.Pass("ThemeHasSameIdAndVersion");
-using NUnit.Framework;
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
namespace Tizen.NUI.Devel.Tests
{
{
tlog.Debug(tag, $"ThemeChangedEventArgsConstructor START");
- ThemeChangedEventArgs a1 = new ThemeChangedEventArgs("themeid");
+ Theme theme = new Theme()
+ {
+ Id = "1"
+ };
+
+ try
+ {
+ var testingTarget = new ThemeChangedEventArgs(theme.Id, ThemeManager.PlatformThemeId, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object ThemeChangedEventArgs.");
+ Assert.IsInstanceOf<ThemeChangedEventArgs>(testingTarget, "Should return ThemeChangedEventArgs instance.");
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
tlog.Debug(tag, $"ThemeChangedEventArgsConstructor END (OK)");
- Assert.Pass("ThemeChangedEventArgsConstructor");
}
[Test]
{
tlog.Debug(tag, $"ThemeChangedEventArgsThemeId START");
- ThemeChangedEventArgs a1 = new ThemeChangedEventArgs("themeid");
- string b1 = a1.ThemeId;
+ Theme theme = new Theme()
+ {
+ Id = "1"
+ };
+ var testingTarget = new ThemeChangedEventArgs(theme.Id, ThemeManager.PlatformThemeId, false);
+ Assert.IsNotNull(testingTarget, "Can't create success object ThemeChangedEventArgs.");
+ Assert.IsInstanceOf<ThemeChangedEventArgs>(testingTarget, "Should return ThemeChangedEventArgs instance.");
+
+ try
+ {
+ var result = testingTarget.ThemeId;
+ tlog.Debug(tag, "themeId :" + result);
+ }
+ catch (Exception e)
+ {
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception: Failed!");
+ }
tlog.Debug(tag, $"ThemeChangedEventArgsThemeId END (OK)");
- Assert.Pass("ThemeChangedEventArgsThemeId");
}
}
}
-using NUnit.Framework;
-using System;
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
using System.Collections.Generic;
namespace Tizen.NUI.Devel.Tests
[Test]
[Category("P1")]
- [Description("Test ThemeManager DefaultTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.DefaultTheme A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("COVPARAM", "")]
- public void ThemeManagerDefaultTheme()
- {
- tlog.Debug(tag, $"ThemeManagerDefaultTheme START");
-
- Theme a1 = ThemeManager.DefaultTheme;
- ThemeManager.DefaultTheme = a1;
-
- tlog.Debug(tag, $"ThemeManagerDefaultTheme END (OK)");
- Assert.Pass("ThemeManagerDefaultTheme");
- }
-
- [Test]
- [Category("P1")]
[Description("Test ThemeManager CurrentTheme.")]
[Property("SPEC", "Tizen.NUI.ThemeManager.CurrentTheme A")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
- [Description("Test ThemeManager ApplyBaseTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.ApplyBaseTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeManagerApplyBaseTheme()
- {
- tlog.Debug(tag, $"ThemeManagerApplyBaseTheme START");
-
-
- ThemeManager.ApplyBaseTheme("mythemeid");
-
- tlog.Debug(tag, $"ThemeManagerApplyBaseTheme END (OK)");
- Assert.Pass("ThemeManagerApplyBaseTheme");
- }
-
- [Test]
- [Category("P1")]
[Description("Test ThemeManager GetStyle.")]
[Property("SPEC", "Tizen.NUI.ThemeManager.GetStyle M")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
- [Description("Test ThemeManager GetBuiltinTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.GetBuiltinTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeManagerGetBuiltinTheme()
- {
- tlog.Debug(tag, $"ThemeManagerGetBuiltinTheme START");
-
-
- ThemeManager.GetBuiltinTheme("myThemeID");
-
- tlog.Debug(tag, $"ThemeManagerGetBuiltinTheme END (OK)");
- Assert.Pass("ThemeManagerGetBuiltinTheme");
- }
-
- [Test]
- [Category("P1")]
[Description("Test ThemeManager ApplyFallbackTheme.")]
[Property("SPEC", "Tizen.NUI.ThemeManager.ApplyFallbackTheme M")]
[Property("SPEC_URL", "-")]
tlog.Debug(tag, $"ThemeManagerApplyFallbackTheme END (OK)");
Assert.Pass("ThemeManagerApplyFallbackTheme");
}
-
- [Test]
- [Category("P1")]
- [Description("Test ThemeManager ApplyExternalTheme.")]
- [Property("SPEC", "Tizen.NUI.ThemeManager.ApplyExternalTheme M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void ThemeManagerApplyExternalTheme()
- {
- tlog.Debug(tag, $"ThemeManagerApplyExternalTheme START");
-
- Dictionary<string, string> b1 = new Dictionary<string, string>
- {
- { "test1", "test2" }
- };
-
-
- DictionaryExternalTheme c1 = new DictionaryExternalTheme("myid", "myVersion", b1);
-
- ThemeManager.ApplyExternalTheme(c1);
-
- tlog.Debug(tag, $"ThemeManagerApplyExternalTheme END (OK)");
- Assert.Pass("ThemeManagerApplyExternalTheme");
- }
-
}
}
+++ /dev/null
-using NUnit.Framework;
-
-namespace Tizen.NUI.Devel.Tests
-{
- using tlog = Tizen.Log;
-
- [TestFixture]
- [Description("public/Theme/TizenExternalTheme")]
- internal class PublicTizenExternalThemeTest
- {
- private const string tag = "NUITEST";
- private readonly object themeLoader;
-
- [SetUp]
- public void Init()
- {
- tlog.Info(tag, "Init() is called!");
- }
-
- [TearDown]
- public void Destroy()
- {
- tlog.Info(tag, "Destroy() is called!");
- }
-
- [Test]
- [Category("P1")]
- [Description("Test TizenExternalTheme GetValue.")]
- [Property("SPEC", "Tizen.NUI.TizenExternalTheme.GetValue M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "")]
- public void TizenExternalThemeGetValue()
- {
- tlog.Debug(tag, $"TizenExternalThemeGetValue START");
-
- Tizen.Applications.ThemeManager.ThemeLoader themeLoader = new Tizen.Applications.ThemeManager.ThemeLoader();
-
- Tizen.Applications.ThemeManager.Theme a1 = null;
- string id = "myId";
-
- a1 = themeLoader.LoadTheme(id);
-
- TizenExternalTheme b1 = new TizenExternalTheme(a1);
-
-
-
- tlog.Debug(tag, $"TizenExternalThemeGetValue END (OK)");
- Assert.Pass("TizenExternalThemeGetValue");
- }
- }
-}
-
using NUnit.Framework;
+using System;
using System.Collections.Generic;
namespace Tizen.NUI.Devel.Tests
[Test]
[Category("P1")]
- [Description("Create a GLWindow object.")]
+ [Description("GLWindow constructor.")]
[Property("SPEC", "Tizen.NUI.GLWindow.GLWindow C")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
public void GLWindowConstructor()
{
tlog.Debug(tag, $"GLWindowConstructor START");
- string name = "myGLWindow";
- Rectangle rectangle = new Rectangle(20, 20, 100, 100);
- GLWindow a1 = new GLWindow(name, rectangle, true);
- GLWindow a2 = new GLWindow();
- GLWindow a3 = new GLWindow(GLWindow.getCPtr(a1).Handle, true);
+ var testingTarget = new GLWindow();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "should be an instance of testing target class!");
- a1.Destroy();
- a2.Destroy();
- a3.Destroy();
+ testingTarget.Destroy();
tlog.Debug(tag, $"GLWindowConstructor END (OK)");
- Assert.Pass("GLWindowConstructor");
}
[Test]
[Category("P1")]
- [Description("GLWindow WindowSize")]
- [Property("SPEC", "Tizen.NUI.GLWindow.WindowSize A")]
+ [Description("GLWindow constructor. With name.")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GLWindow C")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- public void GLWindowWindowSize()
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ public void GLWindowConstructorWithName()
{
- tlog.Debug(tag, $"GLWindowWindowSize START");
+ tlog.Debug(tag, $"GLWindowConstructorWithName START");
+
string name = "myGLWindow";
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- Size2D b1 = a1.WindowSize;
- a1.WindowSize = b1;
- a1.WindowSize = null;
-
a1.Destroy();
- tlog.Debug(tag, $"GLWindowWindowSize END (OK)");
- Assert.Pass("GLWindowWindowSize");
+ tlog.Debug(tag, $"GLWindowConstructorWithName END (OK)");
}
[Test]
[Category("P1")]
- [Description("GLWindow SetEglConfig")]
- [Property("SPEC", "Tizen.NUI.GLWindow.SetEglConfig M")]
+ [Description("GLWindow constructor. With GLWindow.")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.GLWindow C")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void GLWindowSetEglConfig()
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ public void GLWindowConstructorWithGLWindow()
{
- tlog.Debug(tag, $"GLWindowSetEglConfig START");
- string name = "myGLWindow";
- Rectangle rectangle = new Rectangle(20, 20, 100, 100);
- GLWindow a1 = new GLWindow(name, rectangle, true);
+ tlog.Debug(tag, $"GLWindowConstructorWithGLWindow START");
- GLWindow.GLESVersion b1 = new GLWindow.GLESVersion();
- a1.SetEglConfig(true, true, 10, b1);
+ using (GLWindow glwindow = new GLWindow())
+ {
+ var testingTarget = new GLWindow(glwindow.SwigCPtr.Handle, false);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "should be an instance of testing target class!");
- a1.Destroy();
- tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)");
- Assert.Pass("GLWindowSetEglConfig");
+ testingTarget.Destroy();
+ }
+
+ tlog.Debug(tag, $"GLWindowConstructorWithGLWindow END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("GLWindow WindowSize")]
+ [Property("SPEC", "Tizen.NUI.GLWindow.WindowSize A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ public void GLWindowWindowSize()
+ {
+ tlog.Debug(tag, $"GLWindowWindowSize START");
+
+ var testingTarget = new GLWindow();
+ Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
+ Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
+
+ testingTarget.WindowSize = new Size2D(50, 30);
+ Assert.AreEqual(50, testingTarget.WindowSize.Width, "Should be equal!");
+ Assert.AreEqual(30, testingTarget.WindowSize.Height, "Should be equal!");
+
+ testingTarget.Destroy();
+ tlog.Debug(tag, $"GLWindowWindowSize END (OK)");
}
+ //[Test]
+ //[Category("P1")]
+ //[Description("GLWindow SetEglConfig")]
+ //[Property("SPEC", "Tizen.NUI.GLWindow.SetEglConfig M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void GLWindowSetEglConfig()
+ //{
+ // tlog.Debug(tag, $"GLWindowSetEglConfig START");
+
+ // var testingTarget = new GLWindow();
+ // Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
+ // Assert.IsInstanceOf<GLWindow>(testingTarget, "Should be an instance of GLWindow type.");
+
+ // try
+ // {
+ // testingTarget.SetEglConfig(true, true, 10, GLESVersion.Version20);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception: Failed!");
+ // }
+
+ // testingTarget.Destroy();
+ // tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)");
+ //}
+
[Test]
[Category("P1")]
[Description("GLWindow Show")]
a1.Show();
a1.Destroy();
tlog.Debug(tag, $"GLWindowShow END (OK)");
- Assert.Pass("GLWindowShow");
}
[Test]
a1.Hide();
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowHide END (OK)");
- Assert.Pass("GLWindowHide");
}
a1.Raise();
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowRaise END (OK)");
- Assert.Pass("GLWindowRaise");
}
[Test]
a1.Lower();
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowLower END (OK)");
- Assert.Pass("GLWindowLower");
}
[Test]
a1.Activate();
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowActivate END (OK)");
- Assert.Pass("GLWindowActivate");
}
[Test]
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- Rectangle b1 = a1.WindowPositionSize;
- a1.WindowPositionSize = b1;
+ a1.WindowPositionSize = new Rectangle(30, 40, 50, 60);
+ Assert.AreEqual(30, a1.WindowPositionSize.X, "Should be equal!");
+ Assert.AreEqual(40, a1.WindowPositionSize.Y, "Should be equal!");
+ Assert.AreEqual(50, a1.WindowPositionSize.Width, "Should be equal!");
+ Assert.AreEqual(60, a1.WindowPositionSize.Height, "Should be equal!");
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowWindowPositionSize END (OK)");
- Assert.Pass("GLWindowWindowPositionSize");
}
[Test]
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- a1.GetSupportedAuxiliaryHintCount();
+ var result = a1.GetSupportedAuxiliaryHintCount();
+ tlog.Debug(tag, "SupportedAuxiliaryHintCount : " + result);
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHintCount END (OK)");
- Assert.Pass("GLWindowGetSupportedAuxiliaryHintCount");
}
[Test]
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- a1.GetSupportedAuxiliaryHint(1);
+ var result = a1.GetSupportedAuxiliaryHint(1);
+ tlog.Debug(tag, "GetSupportedAuxiliaryHint : " + result);
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHint END (OK)");
- Assert.Pass("GLWindowGetSupportedAuxiliaryHint");
}
[Test]
a1.AddAuxiliaryHint("myHint", "myValue");
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowAddAuxiliaryHint END (OK)");
- Assert.Pass("GLWindowAddAuxiliaryHint");
}
[Test]
uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
a1.RemoveAuxiliaryHint(pos);
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowRemoveAuxiliaryHint END (OK)");
- Assert.Pass("GLWindowRemoveAuxiliaryHint");
}
[Test]
uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
a1.SetAuxiliaryHintValue(pos, "myValue");
-
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowSetAuxiliaryHintValue END (OK)");
- Assert.Pass("GLWindowSetAuxiliaryHintValue");
}
[Test]
uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
a1.GetAuxiliaryHintValue(pos);
-
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowGetAuxiliaryHintValue END (OK)");
- Assert.Pass("GLWindowGetAuxiliaryHintValue");
}
[Test]
uint pos = a1.AddAuxiliaryHint("myHint", "myValue");
a1.GetAuxiliaryHintId("myHint");
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId END (OK)");
- Assert.Pass("GLWindowGetAuxiliaryHintId");
}
[Test]
GLWindow a1 = new GLWindow(name, rectangle, true);
a1.SetInputRegion(rectangle);
+
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId END (OK)");
- Assert.Pass("GLWindowGetAuxiliaryHintId");
}
[Test]
GLWindow a1 = new GLWindow(name, rectangle, true);
a1.SetOpaqueState(true);
+
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowSetOpaqueState END (OK)");
- Assert.Pass("GLWindowSetOpaqueState");
}
[Test]
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- a1.IsOpaqueState();
+ var result = a1.IsOpaqueState();
+ tlog.Debug(tag, "IsOpaqueState : " + result);
+
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowIsOpaqueState END (OK)");
- Assert.Pass("GLWindowIsOpaqueState");
}
[Test]
GLWindow.GLWindowOrientation o1 = new GLWindow.GLWindowOrientation();
a1.SetPreferredOrientation(o1);
+
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowSetPreferredOrientation END (OK)");
- Assert.Pass("GLWindowSetPreferredOrientation");
}
[Test]
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
+ var result = a1.GetCurrentOrientation();
+ tlog.Debug(tag, "CurrentOrientation : " + result);
- a1.GetCurrentOrientation();
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowGetCurrentOrientation END (OK)");
- Assert.Pass("GLWindowGetCurrentOrientation");
}
[Test]
a1.SetAvailableOrientations(l1);
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowSetAvailableOrientations END (OK)");
- Assert.Pass("GLWindowSetAvailableOrientations");
}
[Test]
GLWindow a1 = new GLWindow(name, rectangle, true);
a1.RenderOnce();
+
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowRenderOnce END (OK)");
- Assert.Pass("GLWindowRenderOnce");
}
[Test]
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
+ a1.RegisterGlCallback(GLInit, GLRenderFrame, GLTerminate);
- a1.RegisterGlCallback(b1, c1, d1);
+ a1.Destroy();
tlog.Debug(tag, $"GLWindowRegisterGlCallback END (OK)");
- Assert.Pass("GLWindowRegisterGlCallback");
}
- public void b1() { }
- public int c1() { return 0; }
- public void d1() { }
-
- [Test]
- [Category("P1")]
- [Description("GLWindow Destroy")]
- [Property("SPEC", "Tizen.NUI.GLWindow.Destroy M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void GLWindowDestroy()
- {
- tlog.Debug(tag, $"GLWindowDestroy START");
- string name = "myGLWindow";
- Rectangle rectangle = new Rectangle(20, 20, 100, 100);
- GLWindow a1 = new GLWindow(name, rectangle, true);
-
- a1.Destroy();
- tlog.Debug(tag, $"GLWindowDestroy END (OK)");
- Assert.Pass("GLWindowDestroy");
- }
+ public void GLInit() { }
+ public int GLRenderFrame() { return 0; }
+ public void GLTerminate() { }
}
}
Assert.Pass("GLWindowDisconnectNativeSignals");
}
- [Test]
- [Category("P1")]
- [Description("GLWindow GLWindowVisibilityChanged")]
- [Property("SPEC", "Tizen.NUI.GLWindow.VisibilityChanged A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- public void GLWindowVisibilityChanged()
- {
- tlog.Debug(tag, $"GLWindowVisibilityChanged START");
- string name = "myGLWindow";
- Rectangle rectangle = new Rectangle(20, 20, 100, 100);
- GLWindow a1 = new GLWindow(name, rectangle, true);
-
- a1.VisibilityChanged += A1_VisibilityChanged;
- a1.VisibilityChanged -= A1_VisibilityChanged;
-
- GLWindow.VisibilityChangedEventArgs e1 = new GLWindow.VisibilityChangedEventArgs();
- A1_VisibilityChanged(null, e1);
-
- a1.Destroy();
- tlog.Debug(tag, $"GLWindowVisibilityChanged END (OK)");
- Assert.Pass("GLWindowVisibilityChanged");
- }
-
- private void A1_VisibilityChanged(object sender, GLWindow.VisibilityChangedEventArgs e)
- {
- bool b1 = e.Visibility;
- e.Visibility = b1;
-
- return;
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("GLWindow GLWindowVisibilityChanged")]
+ //[Property("SPEC", "Tizen.NUI.GLWindow.VisibilityChanged A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void GLWindowVisibilityChanged()
+ //{
+ // tlog.Debug(tag, $"GLWindowVisibilityChanged START");
+ // string name = "myGLWindow";
+ // Rectangle rectangle = new Rectangle(20, 20, 100, 100);
+ // GLWindow a1 = new GLWindow(name, rectangle, true);
+
+ // a1.VisibilityChanged += A1_VisibilityChanged;
+ // a1.VisibilityChanged -= A1_VisibilityChanged;
+
+ // a1.Destroy();
+ // tlog.Debug(tag, $"GLWindowVisibilityChanged END (OK)");
+ //}
+
+ private void A1_VisibilityChanged(object sender, GLWindow.VisibilityChangedEventArgs e) { }
[Test]
[Category("P1")]
-using NUnit.Framework;
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
namespace Tizen.NUI.Devel.Tests
{
{
private const string tag = "NUITEST";
+ private delegate bool dummyCallback(IntPtr glWindow);
+ private bool OnDummyCallback(IntPtr data)
+ {
+ return false;
+ }
+
[SetUp]
public void Init()
{
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1);
+ GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
b1.Dispose();
a1.Destroy();
Assert.Pass("GLWindowVisibilityChangedEventConstructor");
}
- [Test]
- [Category("P1")]
- [Description("GLWindowVisibilityChangedEvent Empty")]
- [Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Empty M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void GLWindowVisibilityChangedEventEmpty()
- {
- tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty START");
- string name = "myGLWindow";
- Rectangle rectangle = new Rectangle(20, 20, 100, 100);
- GLWindow a1 = new GLWindow(name, rectangle, true);
-
- GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1);
- b1.Empty();
-
- b1.Dispose();
- a1.Destroy();
- tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty END (OK)");
- Assert.Pass("GLWindowVisibilityChangedEventEmpty");
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("GLWindowVisibilityChangedEvent Empty")]
+ //[Property("SPEC", "Tizen.NUI.GLWindowVisibilityChangedEvent.Empty M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void GLWindowVisibilityChangedEventEmpty()
+ //{
+ // tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty START");
+
+ // using (GLWindow glWindow = new GLWindow())
+ // {
+ // var testingTarget = new GLWindowVisibilityChangedEvent(glWindow.SwigCPtr.Handle, false);
+
+ // try
+ // {
+ // var result = testingTarget.Empty();
+ // tlog.Debug(tag, "result : " + result);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
+
+ // tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty END (OK)");
+ //}
[Test]
[Category("P1")]
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1);
+ GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
b1.GetConnectionCount();
a1.Destroy();
//public void GLWindowVisibilityChangedEventConnect()
//{
// tlog.Debug(tag, $"GLWindowVisibilityChangedEventConnect START");
- // string name = "myGLWindow";
- // Rectangle rectangle = new Rectangle(20, 20, 100, 100);
- // GLWindow a1 = new GLWindow(name, rectangle, true);
-
- // GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1);
- // Delegate s1 = new Delegate;
- // b1.Connect(s1);
+ // using (GLWindow glWindow = new GLWindow())
+ // {
+ // var testingTarget = new GLWindowVisibilityChangedEvent(glWindow.SwigCPtr.Handle, false);
+
+ // try
+ // {
+ // dummyCallback callback = OnDummyCallback;
+ // testingTarget.Connect(callback);
+ // testingTarget.Disconnect(callback);
+ // }
+ // catch (Exception e)
+ // {
+ // tlog.Debug(tag, e.Message.ToString());
+ // Assert.Fail("Caught Exception : Failed!");
+ // }
+
+ // testingTarget.Dispose();
+ // }
- // a1.Destroy();
// tlog.Debug(tag, $"GLWindowVisibilityChangedEventConnect END (OK)");
// Assert.Pass("GLWindowVisibilityChangedEventConnect");
//}
Rectangle rectangle = new Rectangle(20, 20, 100, 100);
GLWindow a1 = new GLWindow(name, rectangle, true);
- GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1);
+ GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);
b1.Emit(a1, true);
a1.Destroy();
{
if (myWin != null)
{
- myWin.Dispose();
+ myWin.Destroy();
myWin = null;
}
tlog.Info(tag, "Destroy() is called!");
public void WindowWindowPositionSize()
{
tlog.Debug(tag, $"WindowWindowPositionSize START");
- try
- {
- Rectangle r1 = myWin.WindowPositionSize;
- myWin.WindowPositionSize = r1;
- }
- catch (Exception e)
- {
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
- Assert.Fail("Caught Exception" + e.ToString());
- }
- tlog.Debug(tag, $"WindowWindowPositionSize END (OK)");
- Assert.Pass("WindowWindowPositionSize");
- }
-
- [Test]
- [Category("P1")]
- [Description("Window DEFAULT_BACKGROUND_COLOR")]
- [Property("SPEC", "Tizen.NUI.Window.DEFAULT_BACKGROUND_COLOR A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- public void WindowDEFAULT_BACKGROUND_COLOR()
- {
- tlog.Debug(tag, $"WindowDEFAULT_BACKGROUND_COLOR START");
try
{
- Vector4 v1 = Window.DEFAULT_BACKGROUND_COLOR;
+ myWin.WindowPositionSize = new Rectangle(1, 2, 3, 4);
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
- tlog.Debug(tag, $"WindowDEFAULT_BACKGROUND_COLOR END (OK)");
- Assert.Pass("WindowDEFAULT_BACKGROUND_COLOR");
- }
- [Test]
- [Category("P1")]
- [Description("Window DEBUG_BACKGROUND_COLOR")]
- [Property("SPEC", "Tizen.NUI.Window.DEBUG_BACKGROUND_COLOR A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- public void WindowDEBUG_BACKGROUND_COLOR()
- {
- tlog.Debug(tag, $"WindowDEBUG_BACKGROUND_COLOR START");
- try
- {
- Vector4 v1 = Window.DEBUG_BACKGROUND_COLOR;
- }
- catch (Exception e)
- {
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
- }
- tlog.Debug(tag, $"WindowDEBUG_BACKGROUND_COLOR END (OK)");
- Assert.Pass("WindowDEBUG_BACKGROUND_COLOR");
+ tlog.Debug(tag, $"WindowWindowPositionSize END (OK)");
}
+ //[Test]
+ //[Category("P1")]
+ //[Description("Window DEFAULT_BACKGROUND_COLOR")]
+ //[Property("SPEC", "Tizen.NUI.Window.DEFAULT_BACKGROUND_COLOR A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void WindowDEFAULT_BACKGROUND_COLOR()
+ //{
+ // tlog.Debug(tag, $"WindowDEFAULT_BACKGROUND_COLOR START");
+ // try
+ // {
+ // Vector4 v1 = Window.DEFAULT_BACKGROUND_COLOR;
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"WindowDEFAULT_BACKGROUND_COLOR END (OK)");
+ // Assert.Pass("WindowDEFAULT_BACKGROUND_COLOR");
+ //}
+
+ //[Test]
+ //[Category("P1")]
+ //[Description("Window DEBUG_BACKGROUND_COLOR")]
+ //[Property("SPEC", "Tizen.NUI.Window.DEBUG_BACKGROUND_COLOR A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //public void WindowDEBUG_BACKGROUND_COLOR()
+ //{
+ // tlog.Debug(tag, $"WindowDEBUG_BACKGROUND_COLOR START");
+ // try
+ // {
+ // Vector4 v1 = Window.DEBUG_BACKGROUND_COLOR;
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"WindowDEBUG_BACKGROUND_COLOR END (OK)");
+ // Assert.Pass("WindowDEBUG_BACKGROUND_COLOR");
+ //}
+
[Test]
[Category("P1")]
[Description("Window GetLayer")]
public void WindowGetLayer()
{
tlog.Debug(tag, $"WindowGetLayer START");
+
try
{
- myWin.GetLayer(65535);
+ myWin.GetLayer(0);
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
tlog.Debug(tag, $"WindowGetLayer END (OK)");
- Assert.Pass("WindowGetLayer");
- }
-
- [Test]
- [Category("P1")]
- [Description("Window Destroy")]
- [Property("SPEC", "Tizen.NUI.Window.Destroy M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void WindowDestroy()
- {
- tlog.Debug(tag, $"WindowDestroy START");
- try
- {
- Rectangle r2 = new Rectangle(0, 0, 20, 20);
- Window w1 = new Window(r2);
-
- w1.Destroy();
- w1 = null;
- }
- catch (Exception e)
- {
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
- }
- tlog.Debug(tag, $"WindowDestroy END (OK)");
- Assert.Pass("WindowDestroy");
}
[Test]
public void WindowGetCurrentOrientation()
{
tlog.Debug(tag, $"WindowGetCurrentOrientation START");
+
try
{
myWin.GetCurrentOrientation();
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
+
tlog.Debug(tag, $"WindowGetCurrentOrientation END (OK)");
- Assert.Pass("WindowGetCurrentOrientation");
}
- [Test]
- [Category("P1")]
- [Description("Window SetAvailableOrientations")]
- [Property("SPEC", "Tizen.NUI.Window.SetAvailableOrientations M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void WindowSetAvailableOrientations()
- {
- tlog.Debug(tag, $"WindowSetAvailableOrientations START");
- try
- {
- List<Window.WindowOrientation> l1 = new List<Window.WindowOrientation>();
- Window.WindowOrientation o1 = new Window.WindowOrientation();
-
- l1.Add(o1);
- myWin.SetAvailableOrientations(l1);
- }
- catch (Exception e)
- {
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
- }
- tlog.Debug(tag, $"WindowSetAvailableOrientations END (OK)");
- Assert.Pass("WindowSetAvailableOrientations");
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("Window SetAvailableOrientations")]
+ //[Property("SPEC", "Tizen.NUI.Window.SetAvailableOrientations M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void WindowSetAvailableOrientations()
+ //{
+ // tlog.Debug(tag, $"WindowSetAvailableOrientations START");
+ // try
+ // {
+ // List<Window.WindowOrientation> l1 = new List<Window.WindowOrientation>();
+
+ // l1.Add(Window.WindowOrientation.Landscape);
+ // l1.Add(Window.WindowOrientation.LandscapeInverse);
+ // l1.Add(Window.WindowOrientation.NoOrientationPreference);
+ // l1.Add(Window.WindowOrientation.Portrait);
+ // l1.Add(Window.WindowOrientation.PortraitInverse);
+
+ // myWin.SetAvailableOrientations(l1);
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+
+ // tlog.Debug(tag, $"WindowSetAvailableOrientations END (OK)");
+ // Assert.Pass("WindowSetAvailableOrientations");
+ //}
[Test]
[Category("P1")]
public void WindowGetNativeId()
{
tlog.Debug(tag, $"WindowGetNativeId START");
+
try
{
myWin.GetNativeId();
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
+
tlog.Debug(tag, $"WindowGetNativeId END (OK)");
- Assert.Pass("WindowGetNativeId");
}
[Test]
public void WindowGetNativeHandle()
{
tlog.Debug(tag, $"WindowGetNativeHandle START");
+
try
{
myWin.GetNativeHandle();
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
+
tlog.Debug(tag, $"WindowGetNativeHandle END (OK)");
- Assert.Pass("WindowGetNativeHandle");
}
[Test]
public void WindowAdd()
{
tlog.Debug(tag, $"WindowAdd START");
+
try
{
Layer layer = null;
myWin.Add(layer);
}
- catch (Exception e)
+ catch (ArgumentNullException e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowAdd END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
}
- tlog.Debug(tag, $"WindowAdd END (OK)");
- Assert.Pass("WindowAdd");
}
[Test]
public void WindowRemove()
{
tlog.Debug(tag, $"WindowRemove START");
+
try
{
Layer layer = null;
myWin.Remove(layer);
}
- catch (Exception e)
+ catch (ArgumentNullException e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowRemove END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
}
- tlog.Debug(tag, $"WindowRemove END (OK)");
- Assert.Pass("WindowRemove");
}
[Test]
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
+
tlog.Debug(tag, $"WindowGetRenderTaskList END (OK)");
- Assert.Pass("WindowGetRenderTaskList");
}
- [Test]
- [Category("P1")]
- [Description("Window GetObjectRegistry")]
- [Property("SPEC", "Tizen.NUI.Window.GetObjectRegistry M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- public void WindowGetObjectRegistry()
- {
- tlog.Debug(tag, $"WindowGetObjectRegistry START");
- try
- {
- myWin.GetObjectRegistry();
- }
- catch (Exception e)
- {
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
- }
- tlog.Debug(tag, $"WindowGetObjectRegistry END (OK)");
- Assert.Pass("WindowGetObjectRegistry");
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("Window GetObjectRegistry")]
+ //[Property("SPEC", "Tizen.NUI.Window.GetObjectRegistry M")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "MR")]
+ //public void WindowGetObjectRegistry()
+ //{
+ // tlog.Debug(tag, $"WindowGetObjectRegistry START");
+ // try
+ // {
+ // myWin.GetObjectRegistry();
+ // }
+ // catch (Exception e)
+ // {
+ // Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
+
+ // Assert.Fail("Caught Exception" + e.ToString());
+ // }
+ // tlog.Debug(tag, $"WindowGetObjectRegistry END (OK)");
+ // Assert.Pass("WindowGetObjectRegistry");
+ //}
[Test]
[Category("P1")]
public void WindowSetWindowSize()
{
tlog.Debug(tag, $"WindowSetWindowSize START");
+
try
{
Size2D s1 = null;
myWin.SetWindowSize(s1);
}
- catch (Exception e)
+ catch (ArgumentNullException e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowSetWindowSize END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
}
- tlog.Debug(tag, $"WindowSetWindowSize END (OK)");
- Assert.Pass("WindowSetWindowSize");
}
[Test]
public void WindowSetPosition()
{
tlog.Debug(tag, $"WindowSetPosition START");
+
try
{
Position2D p1 = null;
myWin.SetPosition(p1);
}
- catch (Exception e)
+ catch (ArgumentNullException e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowSetPosition END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
}
- tlog.Debug(tag, $"WindowSetPosition END (OK)");
- Assert.Pass("WindowSetPosition");
}
[Test]
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
tlog.Debug(tag, $"WindowSetPositionSize END (OK)");
- Assert.Pass("WindowSetPositionSize");
}
[Test]
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
+
tlog.Debug(tag, $"WindowAddFrameUpdateCallback END (OK)");
- Assert.Pass("WindowAddFrameUpdateCallback");
}
[Test]
}
catch (Exception e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ Assert.Fail("Caught Exception : Failed!");
}
+
tlog.Debug(tag, $"WindowRemoveFrameUpdateCallback END (OK)");
- Assert.Pass("WindowRemoveFrameUpdateCallback");
}
[Test]
public void WindowAddFrameRenderedCallback()
{
tlog.Debug(tag, $"WindowAddFrameRenderedCallback START");
+
try
{
FrameCallbackType f1 = null;
myWin.AddFrameRenderedCallback(f1, 1);
}
- catch (Exception e)
+ catch (ArgumentNullException e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowAddFrameRenderedCallback END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
}
- tlog.Debug(tag, $"WindowAddFrameRenderedCallback END (OK)");
- Assert.Pass("WindowAddFrameRenderedCallback");
}
[Test]
public void WindowAddFramePresentedCallback()
{
tlog.Debug(tag, $"WindowAddFramePresentedCallback START");
+
try
{
FrameCallbackType f1 = null;
myWin.AddFramePresentedCallback(f1, 1);
}
- catch (Exception e)
+ catch (ArgumentNullException e)
{
- Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
-
- Assert.Fail("Caught Exception" + e.ToString());
+ tlog.Debug(tag, e.Message.ToString());
+ tlog.Debug(tag, $"WindowAddFramePresentedCallback END (OK)");
+ Assert.Pass("Caught ArgumentNullException : Passed!");
}
- tlog.Debug(tag, $"WindowAddFramePresentedCallback END (OK)");
- Assert.Pass("WindowAddFramePresentedCallback");
}
}
}
\ No newline at end of file