From 5fb703fb3be66a44770bdb22be09c624ba601d3e Mon Sep 17 00:00:00 2001 From: "OPTIMUS-PRIME\\craig" Date: Fri, 7 Sep 2018 23:53:31 +0100 Subject: [PATCH] add full overlay image test to library tests. --- TestCentre/LibraryTests.fs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/TestCentre/LibraryTests.fs b/TestCentre/LibraryTests.fs index 0ade21a..5173ae9 100644 --- a/TestCentre/LibraryTests.fs +++ b/TestCentre/LibraryTests.fs @@ -10,6 +10,7 @@ open SmoulderingBeachBall.Services open System.IO open System.Threading + open FsCheck (* '3000' is an arbitary value. It is used to keep the testing times sane. This function is used to randomly generate image sizes but you do not need to use it. @@ -75,7 +76,7 @@ fileSaved (spec.width.ToString()) (spec.height.ToString()) = true [] - let ``Can create image with border`` () = + let ``Can create an image with border`` () = resetSavingTestArea () let spec = { // See note accompanying 'randomInt' function for constraints information. @@ -86,3 +87,16 @@ overlay = Some (buildBorderOverlay ()) } makeImage spec |> Async.RunSynchronously fileSaved (spec.width.ToString()) (spec.height.ToString()) = true + + [] + let ``Can create an image with a full overlay`` () = + resetSavingTestArea () + let spec = + { // See note accompanying 'randomInt' function for constraints information. + width = randomInt () + height = randomInt () + colour = randomColour () :?> Brush + filePath = saveLocation + overlay = Some (buildFullOverlay ()) } + makeImage spec |> Async.RunSynchronously + fileSaved (spec.width.ToString()) (spec.height.ToString()) = true