Browse Source

add test which checkes the colour of solid colour brush.

The colour of the brush is set using individual RGBA values.
master
Craig Oates 6 years ago
parent
commit
8c403d4e2a
  1. 14
      TestCentre/LibraryTests.fs

14
TestCentre/LibraryTests.fs

@ -99,12 +99,14 @@
(File.Exists sPath) = true (File.Exists sPath) = true
[<Property>] [<Property>]
// need to write a test which tests the colour is the same once coverted. let ``SolidBrush colour matches the individual RGBA values`` () =
let ``Can make a solid brush from RGBA values`` () = let a = newRGBANum ()
let brush = let r = newRGBANum ()
makeSolidBrushFromRGBA (newRGBANum ()) (newRGBANum ()) (newRGBANum ()) (newRGBANum ()) let g = newRGBANum ()
let b = brush :? SolidBrush let b = newRGBANum ()
b = true let referenceColour = Color.FromArgb (a, r, g, b)
let brush = makeSolidBrushFromRGBA r g b a
brush.Color = referenceColour
[<Property>] [<Property>]

Loading…
Cancel
Save