/// <summary> /// Begins an edit on a TransitionRow. /// </summary> public void BeginEdit() { if (!isEditing) { backupTrans = trans; isEditing = true; } }
/// <summary> /// Pushes changes since the last BeginEdit or IBindingList.AddNew call /// into the underlying StateRow. /// </summary> public void EndEdit() { if (isEditing) { backupTrans = new TransitionProperties(); isEditing = false; isNew = false; } }
/// <summary> /// Discards changes since the last BeginEdit call. /// </summary> public void CancelEdit() { if (isEditing) { trans = backupTrans; isEditing = false; if (isNew) { OnEditCancelled(); } } }
public void BuildParams_WhenCalledWithTransitions_VerifyExpectedOutput( TransitionProperties properties, Transition transition, string expected) { // Arrange _rotator.Transition = transition; _rotator.Params = properties; // Act string result = _rotator.GetType().CallMethod(BuildParams, new object[0], _rotator) as string; // Assert result.ShouldSatisfyAllConditions( () => result.ShouldNotBeNull(), () => result.ShouldBe(expected), () => _rotator.IsContentMatched(new Rotator { Transition = transition, Params = properties }, nameof(Rotator.Params)).ShouldBeTrue() ); }