Created
December 15, 2012 17:08
-
-
Save anonymous/4297250 to your computer and use it in GitHub Desktop.
using Simple.Data from F# for fun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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