public void ShouldCallInitializationHandlerBeforeAndAfterRequest()
    {
      RequestManager manager = new RequestManager();
      Request request = new Request { Path = "TestPage.aspx", InitializationHandlers = { new InitializationHandler(typeof(SampleRequestInitializationHandler), new object[] { "parameter" }) } };

      Response response = manager.ExecuteRequest(request);

      Assert.Equal("parameter", response.Content);
    }
    public void ShouldSetCustomHeaders()
    {
      RequestManager manager = new RequestManager();
      Request request = new Request { Path = "TestPage.aspx", QueryString = "header=MyCustomHeader", Headers = { { "MyCustomHeader", "custom-header-value" } } };

      Response response = manager.ExecuteRequest(request);

      Assert.Equal("custom-header-value", response.Content);
    }
    public void ShouldRequestPage()
    {
      RequestManager manager = new RequestManager();
      Request request = new Request { Path = "TestPage.aspx" };

      Response response = manager.ExecuteRequest(request);

      Assert.Equal(200, response.StatusCode);
      Assert.Equal("Test page", response.Content);
    }