anchor.diff:  
   open System.Reflection
   open Microsoft.FSharp.Reflection
  -let withDatabaseAndStore (f : _ -> _ -> _) () = async {
  +let inline withDatabaseAndStore (f : _ -> _)  = async {
       use database =  getNewDatabase ()
  -    use store = getStore database
  -    let retval = f database store
  -    return! (retval |> box :?> Async<unit>)
  +    use store = getStore database :> IDocumentStore
  +    return! f (database, store)
   }
  +
  +type ParameterizedTest<'a> =
  +    | Sync of string * ('a -> unit)
  +    | Async of string * ('a -> Async<unit>)
  +
  +
  +let testCase' name test =
  +     ParameterizedTest.Sync(name,test)
  +
  +let testCaseAsync' name test  =
  +    ParameterizedTest.Async(name,test)
  +
  +let inline testFixture'<'a> setup =
  +    Seq.map (fun ( parameterizedTest : ParameterizedTest<'a>) ->
  +        match parameterizedTest with
  +        | Sync (name, test) ->
  +            testCase name <| fun () -> test >> async.Return |> setup |> Async.RunSynchronously
  +        | Async (name, test) ->
  +            testCaseAsync name <| setup test
  +
  +    )
  +
   
   [<Tests>]
   let ``Litmus Tests`` =
     testList "litmus Tests" [
  -
       yield! testFixture withDatabase [
           "Can create/destroy database", ignore
           "Can Save/Load Record",
  
positive.code: let newPerson name age =
      { Id = Guid.NewGuid (); Name = name; Age = age }
  
  let savePerson  (store : IDocumentStore) (person : Person) =
      use session = store.OpenSession()
      session.Store(person)
      session.SaveChanges()
      person
  
  let PatchTests = [
      testCase', "patch and then set",
          fun (db : DisposableDatabase) (store : DocumentStore) -> async {
              let marcoPolo = newPerson "Marco Polo" 500
              let edittedMarco = { marcoPolo with Age = 200 }
              savePerson store marcoPolo |> ignore
              use session = store.OpenSession()
  
              session
              |> Doc.patch<Person>(marcoPolo.Id)
              |> Doc.pSet<Person, int> <@ fun dog -> dog.Age @> 200
              Doc.saveChanges session
  
              let actualMarco =
                  session
                  |> Doc.loadByGuid<Person> marcoPolo.Id
              Expect.equal (Some edittedMarco) actualMarco "Edited successfully"
          }
      testCase', "patch and then increment",
          fun db (store : #IDocumentStore) -> async {
              let marcoPolo = newPerson "Marco Polo" 500
              let edittedMarco1 = { marcoPolo with Age = 501 }
              let edittedMarco3 = { marcoPolo with Age = 503 }
              savePerson store marcoPolo |> ignore
              use session = store.OpenSession()
  
              session
              |> Doc.patch<Person>(marcoPolo.Id)
              |> Doc.pInc<Person> <@ fun marco -> marco.Age @>
              Doc.saveChanges session
  
              let actualMarco =
                  session
                  |> Doc.loadByGuid<Person> marcoPolo.Id
              Expect.equal (Some edittedMarco1) actualMarco "Edited successfully"
          }
      testCase', "patch and then increment not by one",
          fun db (store : #IDocumentStore) -> async {
              let marcoPolo = newPerson "Marco Polo" 500
              let edittedMarco3 = { marcoPolo with Age = 503 }
              savePerson store marcoPolo |> ignore
  
              use session = store.OpenSession()
              session
              |> Doc.patch<Person>(marcoPolo.Id)
              |> Doc.pIncPlural<Person> <@ fun marco -> marco.Age @> 3
              Doc.saveChanges session
  
              let actualMarco =
                  session
                  |> Doc.loadByGuid<Person> marcoPolo.Id
              Expect.equal (Some edittedMarco3) actualMarco "Edited successfully"
          }
  ]
  
  let LinQQueryTests = [
      testCase', "count, min, and max",
          fun db (store : #IDocumentStore) -> async {
              let marcoPolo = newPerson "Marco Polo" 500
              let niccoloPolo = newPerson "Niccolo Polo" 800
              let maffeoPolo = newPerson "Maffeo Polo" 801
              use session = store.OpenSession ()
  
              Doc.storeMany session [ marcoPolo; niccoloPolo; maffeoPolo ]
              Doc.saveChanges session
  
              let peopleCount =
                  session
                  |> Doc.query<Person>
                  |> Doc.count<Person> <@ fun person -> person.Age > 500 @>
              Expect.equal 2 peopleCount "Should be the same"
  
              let oldest =
                  session
                  |> Doc.query<Person>
                  |> Doc.max<Person, int> <@ fun person -> person.Age @>
              Expect.equal maffeoPolo.Age oldest "Should be Maffeo Polo"
  
              let youngest =
                  session
                  |> Doc.query<Person>
                  |> Doc.min<Person, int> <@ fun person -> person.Age @>
              Expect.equal marcoPolo.Age youngest "Should be Marco Polo"
          }
      testCase', "paging (skip and take)",
          fun db (store : #IDocumentStore) -> async {
              let marcoPolo = newPerson "Marco Polo" 500
              let niccoloPolo = newPerson "Niccolo Polo" 800
              let maffeoPolo = newPerson "Maffeo Polo" 801
              let magellan = newPerson "Ferdinand Magellan" 600
              let columbus = newPerson "Christopher Columbus" 550
              use session = store.OpenSession ()
  
              let people = [ marcoPolo; niccoloPolo; maffeoPolo; magellan; columbus ]
              let peopleGeneric = new System.Collections.Generic.List<Person>([ niccoloPolo; maffeoPolo; magellan ])
  
              Doc.storeMany session people
              Doc.saveChanges session
  
              let paged =
                  session
                  |> Doc.query<Person>
                  |> Doc.paging 1 3
                  |> Doc.toList
  
              Seq.zip peopleGeneric paged
              |> fun x -> Seq.iter (fun (p, db) -> Expect.equal p db "Same people (paging)") x
          }
      testCase', "orderBy, orderByDescending, and thenBy",
          fun db (store : #IDocumentStore) -> async {
              let marcoPolo = newPerson "Marco Polo" 500
              let niccoloPolo = newPerson "Niccolo Polo" 800
              let maffeoPolo = newPerson "Maffeo Polo" 801
              let magellan = newPerson "Ferdinand Magellan" 600
              let columbus = newPerson "Christopher Columbus" 550
              use session = store.OpenSession ()
  
              let people =
                  [ marcoPolo; niccoloPolo; maffeoPolo; magellan; columbus ]
                  |> List.sortBy (fun person -> person.Age)
                  |> fun x -> Collections.Generic.List<Person>(x)
  
              let peopleReversed =
                  [ marcoPolo; niccoloPolo; maffeoPolo; magellan; columbus ]
                  |> List.sortBy (fun person -> person.Age)
                  |> List.rev
                  |> fun x -> Collections.Generic.List<Person>(x)
  
              Doc.storeMany session people
              Doc.saveChanges session
  
              let ordered =
                  session
                  |> Doc.query<Person>
                  |> Doc.orderBy<Person, int> <@ fun person -> person.Age @>
                  |> Doc.toList
  
              // Expect.equal people ordered "Same people."
              Seq.zip people ordered
              |> fun x -> Seq.iter (fun (r, db) -> Expect.equal r db "same person") x
  
              let reversed =
                  session
                  |> Doc.query<Person>
                  |> Doc.orderByDescending<Person, int> <@ fun person -> person.Age @>
                  |> Doc.toList
              // Expect.equal peopleReversed reversed "Same people. Reversed."
              Seq.zip peopleReversed reversed
              |> fun x -> Seq.iter (fun (r, db) -> Expect.equal r db "same person (rev)") x
          }
  ]
  
  [<Tests>]
  
negative.code: ]
  
  let filterTests = [
      testCase'
          "filter by, Get Record Back" <|
              fun (db, store) ->
                  let expectedDog = saveDog' store
                  use session = store.OpenSession()
                  let actualDog =
  