/// <summary> /// Deletes a workitem used in a Scenario test. /// </summary> public static void DeleteWorkItem(BatchController controller, BatchAccountContext context, string workItemName) { YieldInjectionInterceptor interceptor = CreateHttpRecordingInterceptor(); BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor }; BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); client.DeleteWorkItem(context, workItemName, behaviors); }