Пример #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;
 }
 public void Start(Action<BrowsingSession> testScript)
 {
     var serializableDelegate = new SerializableDelegate<Action<BrowsingSession>>(testScript);
     _appDomainProxy.RunBrowsingSessionInAppDomain(serializableDelegate);
 }
Пример #5
0
 public SerializableDelegate<Action> Execute(SerializableDelegate<Action> shuttle)
 {
     shuttle.Delegate();
     return shuttle;
 }
Пример #6
0
 public SerializableDelegate <Action> ExecuteAction(SerializableDelegate <Action> serializableDelegate)
 {
     serializableDelegate.Delegate();
     return(serializableDelegate);
 }
Пример #7
0
 public void RunCodeInAppDomain(SerializableDelegate<Action> script)
 {
     script.Delegate();
 }
Пример #8
0
 public void RunBrowsingSessionInAppDomain(SerializableDelegate<Action<BrowsingSession>> script)
 {
     var browsingSession = new BrowsingSession();
       script.Delegate(browsingSession);
 }
Пример #9
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 abstract void Initialize(SerializableDelegate<Func<HttpApplication>> initialize, string directory, SerializableDelegate<Action<BrowserContext>> defaults = null);
Пример #10
0
 public void Execute(Action action)
 {
     var serializableDelegate = new SerializableDelegate<Action>(action);
       appDomainProxy.RunCodeInAppDomain(serializableDelegate);
 }
Пример #11
0
 public void RunBrowsingSessionInAppDomain(SerializableDelegate<Action<BrowsingSession>> script)
 {
     script.Delegate(_browsingSession ?? new BrowsingSession());
 }