public void Ctor__initializes_properly() { HttpActionInitializationContext context = new HttpActionInitializationContext(); Assert.NotNull(context.ActionOptions); Assert.NotNull(context.Instrumentation); }
/// <summary> /// Initializes a new instance of the <see cref="HttpAction"/> class. /// </summary> /// <param name="initializationContext">The initialization context.</param> /// <exception cref="System.ArgumentNullException">initializationContext</exception> public HttpAction(HttpActionInitializationContext initializationContext) { if (initializationContext == null) { throw new ArgumentNullException("initializationContext"); } if (initializationContext.ActionOptions == null) { throw new ArgumentException("Cannot initialize the action using the supplied context. The action options object is not set."); } if (initializationContext.Instrumentation == null) { throw new ArgumentException("Cannot initialize the action using the supplied context. The instrumentation context object is not set."); } this.ActionOptions = initializationContext.ActionOptions; this.Instrumentation = initializationContext.Instrumentation; }
public GetFakeDataHttpAction(HttpActionInitializationContext init) : base(init) { }