|
|
|
@ -164,10 +164,21 @@
|
|
|
|
|
Assert.NotEmpty result |
|
|
|
|
|
|
|
|
|
module ``Exception Tests`` = |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(* |
|
|
|
|
let SentencesIsValid sentences = |
|
|
|
|
let FilePathIsValid filePath |
|
|
|
|
*) |
|
|
|
|
[<Fact>] |
|
|
|
|
let ``RequestText throws an ArgumentException when the gibberishLevel is invalid`` () = |
|
|
|
|
let test () = |
|
|
|
|
Pancake.RequestTextAsync (InvalidGibberishInput()) (ValidSentencesInput()) |
|
|
|
|
|> Async.RunSynchronously |
|
|
|
|
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore) |> ignore |
|
|
|
|
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore) |
|
|
|
|
|
|
|
|
|
[<Fact>] |
|
|
|
|
let ``RequestText throws an ArgumentException when the sentences count is invalid`` () = |
|
|
|
|
let test () = |
|
|
|
|
Pancake.RequestTextAsync (ValidGibberishLevelInput()) (InvalidSentencesInput()) |
|
|
|
|
|> Async.RunSynchronously |
|
|
|
|
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore) |
|
|
|
|