|
|
|
@ -45,6 +45,16 @@
|
|
|
|
|
let fileName = Path.GetFileName originalFilePath |
|
|
|
|
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 = |
|
|
|
|
|
|
|
|
|
open FsCheck.Xunit |
|
|
|
@ -56,6 +66,11 @@
|
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
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 sPath = generateSavePath oPath |
|
|
|
|
let spec = |
|
|
|
|