anchor.diff:  open FlexSearch.Api
   open FlexSearch.Api.Message
   open FlexSearch.Core
  -open FsUnit
  -open Fuchu
   open Newtonsoft.Json
   open Newtonsoft.Json.Linq
   open System
  
positive.code:           Uri = ""
            Querystring = ""
            Requestbody = None
            TestCases = new ResizeArray<Test>()
            Output = new ResizeArray<string>()
            OutputResponse = new ResizeArray<string>() }
      result.Output.Add(name)
      result.Output.Add("''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''")
      result.Output.Add("")
      initializeServer()
      result
  
  let ofResource (name : string) (result : Example) = { result with Resource = name }
  
  let withDescription (desc : string) (result : Example) = 
  
      result.Output.Add(desc)
      result.Output.Add("")
      result.Output.Add(sprintf ".. literalinclude:: example-%s.txt" result.Id)
  
negative.code: // Test assertions
  // ----------------------------------------------------------------------------
  let responseStatusEquals (status : HttpStatusCode) (result : Example) = 
      Assert.Equal<HttpStatusCode>(status, result.Response.StatusCode) // "Status code does not match"
      result
  
  let responseContainsHeader (header : string) (value : string) (result : Example) = 
      Assert.Equal<string>(value, result.Response.Headers.Get(header)) // "Header value does not match"
      result
  
  let responseMatches (select : string) (expected : string) (result : Example) = 
      let value = JObject.Parse(result.ResponseBody)
      Assert.Equal<string>(expected, value.SelectToken(select).ToString()) // "Response does not match"
      result
  
  let responseShouldContain (value : string) (result : Example) = 
      Assert.True(result.ResponseBody.Contains(value), "Response does contain the required value")
      result
  
  let responseContainsProperty (group : string) (key : string) (property : string) (expected : string) (result : Example) = 
      let value = JObject.Parse(result.ResponseBody)
      Assert.Equal<string>(expected, value.SelectToken(group).[key].[property].ToString()) //"Response does contain the required property"
      result
  
  let responseBodyIsNull (result : Example) = 
      Assert.True(String.IsNullOrWhiteSpace(result.ResponseBody), "Response should not contain body")
      result
  
  // ----------------------------------------------------------------------------
  // Test logic
  