public void TransitionItemAssign() { tlog.Debug(tag, $"TransitionItemAssign START"); using (View view = new View()) { 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!"); } testingTarget.Dispose(); } tlog.Debug(tag, $"TransitionItemAssign END (OK)"); }
public void TransitionItemConstructor() { tlog.Debug(tag, $"TransitionItemConstructor START"); using (View source = new View() { Position = new Position(0, 0), Size = new Size(100, 50) }) { using (View dest = new View() { Position = new Position(120, 50), Size = new Size(100, 50) }) { using (TimePeriod timePeriod = new TimePeriod(300)) { using (AlphaFunction alphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Default)) { var testingTarget = new TransitionItem(source, dest, true, timePeriod, alphaFunction); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!"); testingTarget.Dispose(); } } } } tlog.Debug(tag, $"TransitionItemConstructor END (OK)"); }
public void TransitionItemConstructorWithTransitionItem() { tlog.Debug(tag, $"TransitionItemConstructorWithTransitionItem START"); using (View view = new View()) { using (TransitionItem item = new TransitionItem(view.SwigCPtr.Handle, false)) { var testingTarget = new TransitionItem(item); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <TransitionItem>(testingTarget, "Should be an Instance of TransitionItem!"); testingTarget.Dispose(); // disposed testingTarget.Dispose(); } } tlog.Debug(tag, $"TransitionItemConstructorWithTransitionItem END (OK)"); }
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()); } newView.Dispose(); currentView.Dispose(); timePeriod.Dispose(); alphaFunction.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"TransitionItemShowSourceAfterFinished END (OK)"); }
public void TransitionItemAssign() { 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)"); }