|
|
@ -111,6 +111,8 @@ |
|
|
|
"reset" function to see all the images produced by this test. This will |
|
|
|
"reset" function to see all the images produced by this test. This will |
|
|
|
mean you will need to manually delete the images yourself if you do. *) |
|
|
|
mean you will need to manually delete the images yourself if you do. *) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// scaleLineThickness |
|
|
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
[<Property>] |
|
|
|
let ``Can apply grid to image and save it using BrushSpec`` () = |
|
|
|
let ``Can apply grid to image and save it using BrushSpec`` () = |
|
|
|
resetSavingTestArea () |
|
|
|
resetSavingTestArea () |
|
|
@ -219,6 +221,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
module UnitTests = |
|
|
|
module UnitTests = |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// scaleLineThickness |
|
|
|
|
|
|
|
|
|
|
|
open TestingHelpers |
|
|
|
open TestingHelpers |
|
|
|
open Xunit |
|
|
|
open Xunit |
|
|
|
open DeathSocket |
|
|
|
open DeathSocket |
|
|
@ -255,3 +259,21 @@ |
|
|
|
let ``Divide By Zero Exception is thrown when 0 columns is used when determining vertical lines`` () = |
|
|
|
let ``Divide By Zero Exception is thrown when 0 columns is used when determining vertical lines`` () = |
|
|
|
let result () = GridPainter.determineVerticalLines 100 100 0 |
|
|
|
let result () = GridPainter.determineVerticalLines 100 100 0 |
|
|
|
Assert.Throws<DivideByZeroException>(fun () -> result () |> ignore) |
|
|
|
Assert.Throws<DivideByZeroException>(fun () -> result () |> ignore) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[<Fact>] |
|
|
|
|
|
|
|
let ``Divide By Zero Exception is thrown when previewDimension is set to 0 when calling scaleLineThickness`` () = |
|
|
|
|
|
|
|
let result () = |
|
|
|
|
|
|
|
GridPainter.scaleLineThickness 0.0 1.0 1.0 |
|
|
|
|
|
|
|
Assert.Throws<DivideByZeroException>(fun () -> result () |> ignore) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[<Fact>] |
|
|
|
|
|
|
|
let ``Divide By Zero Exception is thrown when actualDimension is set to 0 when calling scaleLineThickness`` () = |
|
|
|
|
|
|
|
let result () = |
|
|
|
|
|
|
|
GridPainter.scaleLineThickness 1.0 0.0 1.0 |
|
|
|
|
|
|
|
Assert.Throws<DivideByZeroException>(fun () -> result () |> ignore) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[<Fact>] |
|
|
|
|
|
|
|
let ``Divide By Zero Exception is thrown when lineThickness is set to 0 when calling scaleLineThickness`` () = |
|
|
|
|
|
|
|
let result () = |
|
|
|
|
|
|
|
GridPainter.scaleLineThickness 1.0 1.0 0.0 |
|
|
|
|
|
|
|
Assert.Throws<DivideByZeroException>(fun () -> result () |> ignore) |