anchor.diff:      let addField (index : Index.Dto) (fieldName : string) =
           index.Fields <- index.Fields |> Array.append [|new Field.Dto(fieldName)|]
       
  -//    // ----------------------------------------------------------------------------
  -//    // Global configuration
  -//    // ----------------------------------------------------------------------------
  -//    let url = "http://localhost:9800"
  -//    
  -//
  -//
  -//    /// <summary>
  -//    /// Represent a sample request
  -//    /// </summary>
  -//    type Example = 
  -//        { Resource : string
  -//          mutable Request : HttpWebRequest
  -//          mutable Response : HttpWebResponse
  -//          mutable ResponseBody : string
  -//          Id : string
  -//          Title : string
  -//          Method : string
  -//          Description : string
  -//          Uri : string
  -//          Querystring : string
  -//          Requestbody : string option
  -//          Output : ResizeArray<string>
  -//          OutputResponse : ResizeArray<string> }
  -//    
  -//    let example (id : string) (name : string) = 
  -//        let result = 
  -//            { Resource = ""
  -//              Id = id
  -//              Request = Unchecked.defaultof<_>
  -//              Response = Unchecked.defaultof<_>
  -//              ResponseBody = ""
  -//              Title = name
  -//              Method = ""
  -//              Description = ""
  -//              Uri = ""
  -//              Querystring = ""
  -//              Requestbody = None
  -//              Output = new ResizeArray<string>()
  -//              OutputResponse = new ResizeArray<string>() }
  -//        result.Output.Add(name)
  -//        result.Output.Add
  -//            ("''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''")
  -//        result.Output.Add("")
  -//        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)
  -//        result.Output.Add("\t:language: javascript")
  -//        result.Output.Add("")
  -//        { result with Description = desc }
  -//    
  -//    let request (meth : string) (uri : string) (result : Example) = 
  -//        { result with Method = meth
  -//                      Uri = uri }
  -//    
  -//    let withBody (body : string) (result : Example) = { result with Requestbody = Some(body) }
  -//
  -
  -
  -    /// <summary>
  -    /// Basic index configuration
  -    /// </summary>
  -    let mockIndexSettings() = 
  -        let index = new Index.Dto()
  -        index.IndexName <- "contact"
  -        index.Online <- true
  -        index.IndexConfiguration.DirectoryType <- DirectoryType.Dto.Ram
  -        index.Fields <- 
  -         [| new Field.Dto("firstname", FieldType.Dto.Text)
  -            new Field.Dto("lastname", FieldType.Dto.Text)
  -            new Field.Dto("email", FieldType.Dto.ExactText)
  -            new Field.Dto("country", FieldType.Dto.Text)
  -            new Field.Dto("ipaddress", FieldType.Dto.ExactText)
  -            new Field.Dto("cvv2", FieldType.Dto.Int)
  -            new Field.Dto("description", FieldType.Dto.Highlight)
  -            new Field.Dto("fullname", FieldType.Dto.Text, ScriptName = "fullname") |]
  -        index.Scripts <- 
  -            [| new Script.Dto( ScriptName = "fullname", Source = """return fields.firstname + " " + fields.lastname;""", ScriptType = ScriptType.Dto.ComputedField) |]
  -        let searchProfileQuery = 
  -            new SearchQuery.Dto(index.IndexName, "firstname = '' AND lastname = '' AND cvv2 = '116' AND country = ''", 
  -                            QueryName = "test1")
  -        searchProfileQuery.MissingValueConfiguration.Add("firstname", MissingValueOption.ThrowError)
  -        searchProfileQuery.MissingValueConfiguration.Add("cvv2", MissingValueOption.Default)
  -        searchProfileQuery.MissingValueConfiguration.Add("topic", MissingValueOption.Ignore)
  -        index.SearchProfiles <- [| searchProfileQuery |]
  -        index
  -    
  -//    // ----------------------------------------------------------------------------
  -//    // Test assertions for Example based tests
  -//    // ----------------------------------------------------------------------------
  -//    let responseStatusEquals (status : HttpStatusCode) (result : Example) = 
  -//        status =? result.Response.StatusCode // "Status code does not match"
  -//        result
  -//    
  -//    let responseContainsHeader (header : string) (value : string) (result : Example) = 
  -//        value =? result.Response.Headers.Get(header) // "Header value does not match"
  -//        result
  -//    
  -//    let responseDataMatches (select : string) (expected : string) (result : Example) = 
  -//        let value = JObject.Parse(result.ResponseBody)
  -//        expected =? value.SelectToken("Data").SelectToken(select).ToString() // "Response does not match"
  -//        result
  -//
  -//    let responseErrorMatches (select : string) (expected : string) (result : Example) = 
  -//        let value = JObject.Parse(result.ResponseBody)
  -//        expected =? value.SelectToken("Error").SelectToken(select).ToString() // "Response does not match"
  -//        result
  -//    
  -//    let responseShouldContain (value : string) (result : Example) = 
  -//        result.ResponseBody.Contains(value) =? true // "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)
  -//        expected =? value.SelectToken(group).[key].[property].ToString() // "Response does contain the required property"
  -//        result
  -//    
  -//    let responseBodyIsNull (result : Example) = 
  -//        String.IsNullOrWhiteSpace(result.ResponseBody) =? true // "Response should not contain body"
  -//        result
  -//    
   
       // ----------------------------------------------------------------------------
       // Test assertions for FlexClient based tests
  
positive.code:         client.DeleteIndex(indexName).Result |> isSuccessful
      
      [<Example("post-indices-id-4", "")>]
      member __.``Create an index with dynamic fields`` (client : FlexClient, handler : LoggingHandler) = 
          // The dynamic field are already constructed in the Index.Dto injected parameter
          // See fullname field
          let index = mockIndexSettings()
          client.AddIndex(index).Result |> isCreated
          client.DeleteIndex(index.IndexName).Result |> isSuccessful
      
  
negative.code: type ``Get Index Tests``() = 
      [<Example("get-indices-id-1", "")>]
      member __.``Getting an index detail by name`` (client : FlexClient, handler : LoggingHandler) = 
          let actual = client.GetIndex("contact").Result
          actual |> isSuccessful
          (actual |> data).IndexName =? "contact"
  