Created
August 13, 2017 11:32
-
-
Save CoditCompany/526357c941f215f2dca5b43a8085fc41 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| [<Property>] | |
| let ``String50 don't gets created if length isn't 50 chars`` () = | |
| Arb.generate<string> | |
| |> Gen.filter (String.length >> (<>) 50) | |
| |> Arb.fromGen | |
| |> Prop.forAll <| fun x -> | |
| None = string50 x | |
| [<Property>] | |
| let ``String50 gets created if length is 50 chars`` () = | |
| Arb.generate<char> | |
| |> Gen.listOfLength 50 | |
| |> Gen.map (List.map string >> List.reduce (+)) | |
| |> Arb.fromGen | |
| |> Prop.forAll <| fun x -> | |
| Some <| String50 x = string50 x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment