/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(WorkgroupPermission entity, ARTAction action) { switch (action) { case ARTAction.Compare: Assert.AreEqual(UserRepository.Queryable.Single(a => a.Id == "2").Id, entity.User.Id); break; case ARTAction.Restore: entity.User = UserRepository.Queryable.First(); break; case ARTAction.Update: entity.User = UserRepository.Queryable.Single(a => a.Id == "2"); break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(Permission entity, ARTAction action) { switch (action) { case ARTAction.Compare: Assert.AreEqual(Repository.OfType <User>().GetNullableById(2).LoginId, entity.User.LoginId); break; case ARTAction.Restore: entity.User = UserRestoreValue; break; case ARTAction.Update: UserRestoreValue = entity.User; entity.User = Repository.OfType <User>().GetNullableById(2); break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(ConditionalApproval entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Question); break; case ARTAction.Restore: entity.Question = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.Question; entity.Question = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(ApplicationRole entity, ARTAction action) { const int updateValue = 998; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Level); break; case ARTAction.Restore: entity.Level = IntRestoreValue; break; case ARTAction.Update: IntRestoreValue = entity.Level; entity.Level = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(ServiceMessage entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Message); break; case ARTAction.Restore: entity.Message = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.Message; entity.Message = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(DepartmentalAdminRequest entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.FirstName); break; case ARTAction.Restore: entity.FirstName = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.FirstName; entity.FirstName = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(Notification entity, ARTAction action) { const bool updateValue = false; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Weekly); break; case ARTAction.Restore: entity.Weekly = BoolRestoreValue; break; case ARTAction.Update: BoolRestoreValue = entity.Weekly; entity.Weekly = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(AutoApproval entity, ARTAction action) { const decimal updateValue = 99.99m; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.MaxAmount); break; case ARTAction.Restore: entity.MaxAmount = DecimalRestoreValue; break; case ARTAction.Update: DecimalRestoreValue = entity.MaxAmount; entity.MaxAmount = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(AccessToken entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Reason); break; case ARTAction.Restore: entity.Reason = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.Reason; entity.Reason = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(Building entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.CampusCode); break; case ARTAction.Restore: entity.CampusCode = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.CampusCode; entity.CampusCode = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(Split entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Project); break; case ARTAction.Restore: entity.Project = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.Project; entity.Project = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(Approval entity, ARTAction action) { const bool updateValue = true; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Completed); break; case ARTAction.Restore: entity.Completed = BoolRestoreValue; break; case ARTAction.Update: BoolRestoreValue = entity.Completed; entity.Completed = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(KfsDocument entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.DocNumber); break; case ARTAction.Restore: entity.DocNumber = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.DocNumber; entity.DocNumber = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(CustomField entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Name); break; case ARTAction.Restore: entity.Name = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.Name; entity.Name = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(BugTracking entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.UserId); break; case ARTAction.Restore: entity.UserId = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.UserId; entity.UserId = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(HistoryReceivedLineItem entity, ARTAction action) { const decimal updateValue = 99999.98m; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.NewReceivedQuantity); break; case ARTAction.Restore: entity.NewReceivedQuantity = DecimalRestoreValue; break; case ARTAction.Update: DecimalRestoreValue = entity.NewReceivedQuantity.HasValue ? entity.NewReceivedQuantity.Value : 0; entity.NewReceivedQuantity = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(School entity, ARTAction action) { const string updateValue = "Updated"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.ShortDescription); break; case ARTAction.Restore: entity.ShortDescription = RestoreValue; break; case ARTAction.Update: RestoreValue = entity.ShortDescription; entity.ShortDescription = updateValue; break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected override void UpdateUtility(WorkgroupAccount entity, ARTAction action) { const string updateValue = "Name2"; switch (action) { case ARTAction.Compare: Assert.AreEqual(updateValue, entity.Account.Name); break; case ARTAction.Restore: entity.Account = AccountRepository.Queryable.Single(a => a.Id == "1"); break; case ARTAction.Update: RestoreValue = entity.Account.Name; entity.Account = AccountRepository.Queryable.Single(a => a.Id == "2"); break; } }
/// <summary> /// Updates , compares, restores. /// </summary> /// <param name="entity">The entity.</param> /// <param name="action">The action.</param> protected abstract void UpdateUtility(T entity, ARTAction action);