|
|
|
@ -20,6 +20,7 @@
|
|
|
|
|
open System.Drawing |
|
|
|
|
open System.Reflection |
|
|
|
|
open System.IO |
|
|
|
|
open DeathSocket.Domain |
|
|
|
|
|
|
|
|
|
let rand = Random () |
|
|
|
|
|
|
|
|
@ -68,6 +69,18 @@
|
|
|
|
|
files |
|
|
|
|
|> Array.iter (fun f -> File.Delete(f)) |
|
|
|
|
|
|
|
|
|
let makeTestRGBASpec r g b a = |
|
|
|
|
{ originalPath = "test path" |
|
|
|
|
savePath = "test path" |
|
|
|
|
alpha = float a |
|
|
|
|
red = float r |
|
|
|
|
green = float g |
|
|
|
|
blue = float b |
|
|
|
|
penWidth = float32 10 |
|
|
|
|
rows = newNum () |
|
|
|
|
columns = newNum () } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module PropertyTests = |
|
|
|
|
|
|
|
|
|
open FsCheck.Xunit |
|
|
|
@ -108,6 +121,17 @@
|
|
|
|
|
let brush = makeSolidBrushFromRGBA r g b a |
|
|
|
|
brush.Color = referenceColour |
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
let ``SolidBrush colour matches the RGBASpec`` () = |
|
|
|
|
let a = newRGBANum () |
|
|
|
|
let r = newRGBANum () |
|
|
|
|
let g = newRGBANum () |
|
|
|
|
let b = newRGBANum () |
|
|
|
|
let referenceColour = Color.FromArgb (a, r, g, b) |
|
|
|
|
let referenceSpec = makeTestRGBASpec r g b a |
|
|
|
|
let brush = makeSolidBrushFromRGBASpec referenceSpec |
|
|
|
|
brush.Color = referenceColour |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
let ``Can return a collection of points which represent a grids horizontal lines`` () = |
|
|
|
|