Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2012 17:08
Show Gist options
  • Save anonymous/4297250 to your computer and use it in GitHub Desktop.
Save anonymous/4297250 to your computer and use it in GitHub Desktop.
using Simple.Data from F# for fun
open Simple.Data
open Xunit
open Swensen.Unquote
open ImpromptuInterface.FSharp
let adapter = new InMemoryAdapter()
adapter.SetKeyColumn("Test", "Id");
adapter.SetKeyColumn("Test", "Name");
Database.UseMockAdapter(adapter);
[<Fact>]
let ``sql data provider test`` () =
let db = Database.Open()
db?Test?Insert(1, "Alice")
let record = db?Test?FindById(1)
test <@ record?Id = 1 @>
test <@ record?Name = "Alice" @>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment