public FuncExecutionResult <T> ExecuteFunction <T>(SerializableDelegate <Func <T> > serializableDelegate) { var delegateResult = serializableDelegate.Delegate(); return(new FuncExecutionResult <T> { DelegateCalled = serializableDelegate, DelegateCallResult = delegateResult }); }
/// <summary> /// Runs the test script against the MVC application proxy. /// </summary> /// <param name="script">The test script to be run.</param> public void Process(SerializableDelegate<Action<Browser>> script) { try { var browser = CreateBrowser(defaults); script.Delegate(browser); } catch (Exception exception) { HandleException(exception); } }
/// <summary> /// Initializes the proxy. /// </summary> /// <param name="initialize">The initialization code.</param> /// <param name="directory">The directory in which the test is run.</param> /// <param name="defaults">The default browser context settings.</param> public override void Initialize(SerializableDelegate<Func<HttpApplication>> initialize, string directory, SerializableDelegate<Action<BrowserContext>> defaults = null) { initialize.Delegate(); this.defaults = (defaults != null) ? defaults.Delegate : null; }
public void Start(Action<BrowsingSession> testScript) { var serializableDelegate = new SerializableDelegate<Action<BrowsingSession>>(testScript); _appDomainProxy.RunBrowsingSessionInAppDomain(serializableDelegate); }
public SerializableDelegate<Action> Execute(SerializableDelegate<Action> shuttle) { shuttle.Delegate(); return shuttle; }
public SerializableDelegate <Action> ExecuteAction(SerializableDelegate <Action> serializableDelegate) { serializableDelegate.Delegate(); return(serializableDelegate); }
public void RunCodeInAppDomain(SerializableDelegate<Action> script) { script.Delegate(); }
public void RunBrowsingSessionInAppDomain(SerializableDelegate<Action<BrowsingSession>> script) { var browsingSession = new BrowsingSession(); script.Delegate(browsingSession); }
/// <summary> /// Initializes the proxy. /// </summary> /// <param name="initialize">The initialization code.</param> /// <param name="directory">The directory in which the test is run.</param> /// <param name="defaults">The default browser context settings.</param> public abstract void Initialize(SerializableDelegate<Func<HttpApplication>> initialize, string directory, SerializableDelegate<Action<BrowserContext>> defaults = null);
public void Execute(Action action) { var serializableDelegate = new SerializableDelegate<Action>(action); appDomainProxy.RunCodeInAppDomain(serializableDelegate); }
public void RunBrowsingSessionInAppDomain(SerializableDelegate<Action<BrowsingSession>> script) { script.Delegate(_browsingSession ?? new BrowsingSession()); }