namespace WoofWare.Myriad.Plugins.Test open System open SomeNamespace open NUnit.Framework open FsUnitTyped [] module TestMockGeneratorNoAttr = [] let ``Example of use: IPublicType`` () = let mock : IPublicTypeNoAttr = { PublicTypeNoAttrMock.Empty with Mem1 = fun (s, count) -> List.replicate count s } :> _ let _ = Assert.Throws (fun () -> mock.Mem2 "hi" |> ignore) mock.Mem1 ("hi", 3) |> shouldEqual [ "hi" ; "hi" ; "hi" ] [] let ``Example of use: curried args`` () = let mock : CurriedNoAttr<_> = { CurriedNoAttrMock.Empty () with Mem1 = fun i c -> Array.replicate i c |> String 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" mock.Mem3 (3, "hi") 'a' |> shouldEqual "hiahiahi"