/// <summary>
 /// The routine called after test method call.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The arguments.</param>
 protected override void OnAfterMethodCall(object sender, MethodCallEventArgs args)
 {
   Assert.Equal("testValue", CallContext.LogicalGetData("test1"));
   Assert.Equal("testValue", CallContext.LogicalGetData("test2"));
 }
 /// <summary>
 /// The routine called before test method call.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The arguments.</param>
 protected override void OnBeforeMethodCall(object sender, MethodCallEventArgs args)
 {
   args.Arguments[0] = args.Arguments[0].ToString() + '*';
 }
 /// <summary>
 /// The routine called before test method call.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The arguments.</param>
 protected override void OnBeforeMethodCall(object sender, MethodCallEventArgs args)
 {
   CallContext.LogicalSetData("test1", "testValue");
 }
    /// <summary>
    /// Event handler executed before each method call.
    /// </summary>
    /// <param name="sender">The sender.</param>
    /// <param name="args">The arguments.</param>
    protected virtual void OnBeforeMethodCall(object sender, MethodCallEventArgs args)
    {
      if (args == null)
      {
        throw new ArgumentNullException("args");
      }

      if (this.InitializationManager != null)
      {
        this.InitializationManager.Initialize(args.MethodCallId, new TestInitializationContext(this, args.Method, args.Arguments));
      }
    }