Browse Source

extended comments in library tests.

master
Craig Oates 6 years ago
parent
commit
949a12fa51
  1. 15
      TestCentre/LibraryTests.fs
  2. 1
      TestCentre/Script.fsx

15
TestCentre/LibraryTests.fs

@ -45,6 +45,16 @@
let fileName = Path.GetFileName originalFilePath let fileName = Path.GetFileName originalFilePath
saveLocation + "/" + fileName saveLocation + "/" + fileName
(* To "manually" clear out the SavingTestArea folder, use this function
in script.fsx. More information can be found there, also.*)
let resetSavingTestArea () =
let files = Directory.GetFileSystemEntries(saveLocation, "*.png")
match files.Length with
| 0 -> ()
| _ ->
files
|> Array.iter (fun f -> File.Delete(f))
module PropertyTests = module PropertyTests =
open FsCheck.Xunit open FsCheck.Xunit
@ -56,6 +66,11 @@
[<Property>] [<Property>]
let ``Can apply grid to image and save it`` () = let ``Can apply grid to image and save it`` () =
(* You should end up with one image left over in SavingTestArea.
Comment out the "reset" function to see all the images produced,
by this test. This will mean you will need to manually delete the
images yourself if you do.*)
resetSavingTestArea ()
let oPath = generateLoadPath () let oPath = generateLoadPath ()
let sPath = generateSavePath oPath let sPath = generateSavePath oPath
let spec = let spec =

1
TestCentre/Script.fsx

@ -8,7 +8,6 @@ open System.Reflection
open SmoulderingBeachBall.Domain open SmoulderingBeachBall.Domain
open SmoulderingBeachBall.Services open SmoulderingBeachBall.Services
open System.Threading open System.Threading
open System.Threading
(* Populating LoadingTestArea Folder Scripts (* Populating LoadingTestArea Folder Scripts
=============================================================================== ===============================================================================

Loading…
Cancel
Save