Browse Source

Removed exceptions tests from unit tests.

master
Craig Oates 6 years ago
parent
commit
2ea04a94ed
  1. 36
      TestCentre/UnitTests.fs

36
TestCentre/UnitTests.fs

@ -161,38 +161,4 @@
let result =
Pancake.RequestAllTemplateFilesAsync ()
|> Async.RunSynchronously
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)
[<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)
[<Fact>]
let ``RequestTextFromFile throws an ArgumentException when the gibberishLevel is invalid`` () =
let test () =
Pancake.RequestTextFromFileAsync (InvalidGibberishInput()) (ValidSentencesInput()) (ValidFileInput())
|> Async.RunSynchronously
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore)
[<Fact>]
let ``RequestTextFromFile throws an ArgumentException when the sentences count is invalid`` () =
let test () =
Pancake.RequestTextFromFileAsync (ValidGibberishLevelInput()) (InvalidSentencesInput()) (ValidFileInput())
|> Async.RunSynchronously
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore)
Assert.NotEmpty result
Loading…
Cancel
Save