Browse Source

add full overlay image test to library tests.

master
Craig Oates 6 years ago
parent
commit
5fb703fb3b
  1. 16
      TestCentre/LibraryTests.fs

16
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
[<Property>]
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
[<Property>]
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

Loading…
Cancel
Save