Пример #1
0
        public FuncExecutionResult <T> ExecuteFunction <T>(SerializableDelegate <Func <T> > serializableDelegate)
        {
            var delegateResult = serializableDelegate.Delegate();

            return(new FuncExecutionResult <T> {
                DelegateCalled = serializableDelegate,
                DelegateCallResult = delegateResult
            });
        }
Пример #2
0
 /// <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);
     }
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 public SerializableDelegate <Action> ExecuteAction(SerializableDelegate <Action> serializableDelegate)
 {
     serializableDelegate.Delegate();
     return(serializableDelegate);
 }
Пример #5
0
 public SerializableDelegate<Action> Execute(SerializableDelegate<Action> shuttle)
 {
     shuttle.Delegate();
     return shuttle;
 }
Пример #6
0
 public void RunCodeInAppDomain(SerializableDelegate<Action> script)
 {
     script.Delegate();
 }
Пример #7
0
 public void RunBrowsingSessionInAppDomain(SerializableDelegate<Action<BrowsingSession>> script)
 {
     var browsingSession = new BrowsingSession();
       script.Delegate(browsingSession);
 }
Пример #8
0
 public void RunBrowsingSessionInAppDomain(SerializableDelegate<Action<BrowsingSession>> script)
 {
     script.Delegate(_browsingSession ?? new BrowsingSession());
 }