Allow JSON parsing to happen in an extension method (#63)

This commit is contained in:
Patrick Stevens
2024-01-08 00:50:33 +00:00
committed by GitHub
parent ad2eeaaa4f
commit 948fbfbc84
12 changed files with 284 additions and 37 deletions

View File

@@ -14,6 +14,7 @@ module TestMockGenerator =
{ PublicTypeMock.Empty with
Mem1 = fun (s, count) -> List.replicate count s
}
:> _
let _ =
Assert.Throws<NotImplementedException> (fun () -> mock.Mem2 "hi" |> ignore<int>)
@@ -28,6 +29,7 @@ module TestMockGenerator =
Mem2 = fun (i, s) c -> String.concat $"%c{c}" (List.replicate i s)
Mem3 = fun (i, s) c -> String.concat $"%c{c}" (List.replicate i s)
}
:> _
mock.Mem1 3 'a' |> shouldEqual "aaa"
mock.Mem2 (3, "hi") 'a' |> shouldEqual "hiahiahi"