Browse Source

Removed the exception test from property tests.

master
Craig Oates 6 years ago
parent
commit
7b392eb69d
  1. 59
      TestCentre/PropertyTests.fs

59
TestCentre/PropertyTests.fs

@ -197,61 +197,4 @@
Pancake.RequestAllTemplateFilesAsync ()
|> Async.RunSynchronously
let results = Assert.NotEmpty test
Check.Quick results
module ``Exception Tests`` =
(*
let expectDivideByZero() = Prop.throws<DivideByZeroException,_> (lazy (raise <| DivideByZeroException()))
Check.Quick expectDivideByZero
*)
(*
[<Property>]
let ``RequestText throws an ArgumentException when the gibberishLevel is invalid`` () =
let test =
Pancake.RequestTextAsync (InvalidGibberishInput()) (ValidSentencesInput())
|> Async.RunSynchronously
let results =
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore)
Check.Quick results
*)
//THIS IS A ROUGH TEST -- TO DELETE
[<Property>]
let ``RequestText throws an ArgumentException when the gibberishLevel is invalid`` () =
let test =
Pancake.RequestTextAsync 5 5
|> Async.RunSynchronously
Check.Quick (test)
[<Property>]
let ``RequestText throws an ArgumentException when the sentences count is invalid`` () =
let test =
Pancake.RequestTextAsync (ValidGibberishLevelInput()) (InvalidSentencesInput())
|> Async.RunSynchronously
let results =
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore)
Check.Quick results
[<Property>]
let ``RequestTextFromFile throws an ArgumentException when the gibberishLevel in invalid`` () =
let test () =
Pancake.RequestTextFromFileAsync (InvalidGibberishInput()) (ValidSentencesInput()) (ValidFileInput())
|> Async.RunSynchronously
let results =
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore)
Check.QuickThrowOnFailure results
[<Property>]
let ``RequestTextFromFile throws an ArgumentException when the sentences count is invalid`` () =
let test () =
Pancake.RequestTextFromFileAsync (ValidGibberishLevelInput()) (InvalidSentencesInput()) (ValidFileInput())
|> Async.RunSynchronously
let results =
lazy Assert.Throws<ArgumentException>(fun () -> test |> ignore)
Check.Quick results
(*
let SentencesIsValid sentences =
let FilePathIsValid filePath
*)
Check.Quick results
Loading…
Cancel
Save