Browse Source

Add TextInFileIsValid property test.

master
Craig Oates 6 years ago
parent
commit
5dcc71bdaa
  1. 12
      TestCentre/PropertyTests.fs
  2. 2
      TestCentre/UnitTests.fs

12
TestCentre/PropertyTests.fs

@ -185,4 +185,16 @@
|> Async.RunSynchronously
|> EndsAsIntended
let results () = Assert.True(test())
Check.Quick (results())
[<Property>]
let ``TextInFileIsValid returns true when processing the text in the template files`` () =
(* The template .txt files validity have been tested above.
This test is to for the function, not the .txt files.
Something has gone wrong if there are not quite a lot of explicit template file tests above.
This is why the .txt files are called at random and not broken down into seperate tests. *)
let test () =
Pancake.TextInFileIsValidAsync (ValidFileInput())
|> Async.RunSynchronously
let results () = Assert.True (test())
Check.Quick (results())

2
TestCentre/UnitTests.fs

@ -280,7 +280,7 @@
Assert.True(result)
[<Fact>]
let ``TextInFileIsValid returns correct boolean value when processing the files text`` () =
let ``TextInFileIsValid returns correct boolean value when processing a files text`` () =
let trueResult =
Pancake.TextInFileIsValidAsync TestPost
|> Async.RunSynchronously

Loading…
Cancel
Save