Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Tests
- open Xunit
- open FsCheck.Xunit
- open WidgetCo.Core
- open Say
- open System.Text
- open FsCheck
- [<Theory>]
- [<InlineData(1, 2, 3)>]
- [<InlineData(2, 2, 4)>]
- [<InlineData(3, 3, 6)>]
- let ``My inline unit tests`` (x, y, expected) =
- (add x y) = expected
- [<Property>]
- let ``Different path, Same Destination`` (x:int, y:int) =
- (add x y) = (add y x)
- [<Property>]
- let ``There and back again`` (expected : NonEmptyString) =
- let s = expected.Get
- s = (s |> Encoding.ASCII.GetBytes |> Encoding.ASCII.GetString)
- [<Property>]
- let ``Some things never change`` (xs:List<int>) =
- List.length xs = (xs |> List.sort |> List.length)
- [<Property>]
- let ``The more things change, the more they stay the same`` (xs:List<int>) =
- (List.distinct xs) = (xs |> List.distinct |> List.distinct)
Add Comment
Please, Sign In to add comment