Browse Source

refactor tests to use applyGridToImageAsync function.

master
Craig Oates 5 years ago
parent
commit
d91e41bac6
  1. 67
      TestCentre/LibraryTests.fs

67
TestCentre/LibraryTests.fs

@ -102,6 +102,7 @@
open FsCheck.Xunit
open DeathSocket
open System.Drawing
open DeathSocket
open DeathSocket.GridPainter
open TestingHelpers
open System.IO
@ -116,13 +117,13 @@
resetSavingTestArea ()
let oPath = generateLoadPath ()
let sPath = generateSavePath oPath
{ originalPath = oPath
savePath = sPath
colour = randomBrush () :?> Brush
penWidth = float32 (newPenWidth())
rows = 10
columns = 10 }
|> applyBrushSpecGridAsync
Brush ({ originalPath = oPath
savePath = sPath
colour = randomBrush () :?> Brush
penWidth = float32 (newPenWidth())
rows = 10
columns = 10 })
|> applyGridToImageAsync
|> Async.RunSynchronously
(File.Exists sPath) = true
@ -131,16 +132,16 @@
resetSavingTestArea ()
let oPath = generateLoadPath ()
let sPath = generateSavePath oPath
{ originalPath = oPath
savePath = sPath
alpha = float (newRGBANum ())
red = float (newRGBANum ())
green = float (newRGBANum ())
blue = float (newRGBANum ())
penWidth = float32 (newPenWidth())
rows = 10
columns = 10 }
|> applyRGBAGridAsync
RGBA ({ originalPath = oPath
savePath = sPath
alpha = float (newRGBANum ())
red = float (newRGBANum ())
green = float (newRGBANum ())
blue = float (newRGBANum ())
penWidth = float32 (newPenWidth())
rows = 10
columns = 10 })
|> applyGridToImageAsync
|> Async.RunSynchronously
(File.Exists sPath) = true
@ -180,13 +181,13 @@
resetSavingTestArea()
let oPath = generateLoadPath ()
let sPath = generateSavePath oPath
{ originalPath = oPath
savePath= sPath
skColour = randomSKColour ()
penWidth = float32 (newPenWidth())
rows = newNum ()
columns = newNum () }
|> applySkiaGridAsync
Skia ({ originalPath = oPath
savePath= sPath
skColour = randomSKColour ()
penWidth = float32 (newPenWidth())
rows = newNum ()
columns = newNum () })
|> applyGridToImageAsync
|> Async.RunSynchronously
(File.Exists sPath) = true
@ -195,15 +196,15 @@
resetSavingTestArea()
let oPath = generateLoadPath ()
let sPath = generateSavePath oPath
{ originalPath = oPath
savePath= sPath
red = float32 (newRGBANum ())
green = float32 (newRGBANum ())
blue = float32 (newRGBANum ())
penWidth = float32 (newPenWidth())
rows = newNum ()
columns = newNum () }
|> applySkiaRGBGridAsync
SkiaRGB ({ originalPath = oPath
savePath= sPath
red = float32 (newRGBANum ())
green = float32 (newRGBANum ())
blue = float32 (newRGBANum ())
penWidth = float32 (newPenWidth())
rows = newNum ()
columns = newNum () })
|> applyGridToImageAsync
|> Async.RunSynchronously
(File.Exists sPath) = true

Loading…
Cancel
Save