Browse Source

add scaling pen thickness tests.

master
Craig Oates 5 years ago
parent
commit
9aed4ba609
  1. 18
      TestCentre/LibraryTests.fs

18
TestCentre/LibraryTests.fs

@ -421,6 +421,24 @@
let imagesAreThere = if length < 100 then false else true
Assert.True imagesAreThere
[<Fact>]
let ``Pen thickness scales down to match preview image dimensions`` () =
let result () =
GridPainter.scaleLineThickness (100, 100) (200, 200) 10.0
Assert.Equal (5.0, (result ()))
[<Fact>]
let ``Pen thickness scales up to match preview image dimensions`` () =
let result () =
GridPainter.scaleLineThickness (200, 200) (100, 100) 10.0
Assert.Equal (20.0, (result ()))
[<Fact>]
let ``Pen thickness remains the same when preview image matches actual dimensions`` () =
let result () =
GridPainter.scaleLineThickness (100, 100) (100, 100) 10.0
Assert.Equal (10.0, (result ()))
(* This test is a pre-test test. If the property tests fails, here is a
good place to start. The easiest way to get this test to pass is to
create a folder called "SavingTestArea" in this projects folder

Loading…
Cancel
Save