using Elsa.Workflows; namespace Elsa.Testing.Shared; /// /// Provides extension methods for to enhance its functionality. /// public static class ActivityExecutionContextExtensions { /// /// Determines whether the specified activity is scheduled in the workflow execution context. /// /// The activity execution context instance used for checking the scheduled activity. /// The activity to check for scheduling. /// True if the specified activity is scheduled; otherwise, false. public static bool HasScheduledActivity(this ActivityExecutionContext activityExecutionContext, IActivity activity) { return activityExecutionContext.WorkflowExecutionContext.Scheduler.Find(x => x.Activity == activity) != null; } }