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
[<Property>]
// need to write a test which tests the colour is the same once coverted.
let ``Can make a solid brush from RGBA values`` () =
let brush =
makeSolidBrushFromRGBA (newRGBANum ()) (newRGBANum ()) (newRGBANum ()) (newRGBANum ())
let b = brush :? SolidBrush
b = true
let ``SolidBrush colour matches the individual RGBA values`` () =
let a = newRGBANum ()
let r = newRGBANum ()
let g = newRGBANum ()
let b = newRGBANum ()
let referenceColour = Color.FromArgb (a, r, g, b)
let brush = makeSolidBrushFromRGBA r g b a
brush.Color = referenceColour
[<Property>]

Loading…
Cancel
Save