|
|
@ -23,7 +23,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
let rand = Random () |
|
|
|
let rand = Random () |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(* These are duplicates from ConsoleTests.fs (both of them). See point |
|
|
|
(* These are duplicates from ConsoleTests.fs (both of them). See point |
|
|
|
about helpers. Tests for checking these locations can be found in |
|
|
|
about helpers. Tests for checking these locations can be found in |
|
|
|
ConsoleTests.fs. *) |
|
|
|
ConsoleTests.fs. *) |
|
|
@ -46,6 +45,8 @@ |
|
|
|
Intended for horizontal and vertical line tests. *) |
|
|
|
Intended for horizontal and vertical line tests. *) |
|
|
|
let newNum () = rand.Next(1, 1000) |
|
|
|
let newNum () = rand.Next(1, 1000) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let newRGBANum () = rand.Next (255) |
|
|
|
|
|
|
|
|
|
|
|
let imagesInLoadingTestArea = |
|
|
|
let imagesInLoadingTestArea = |
|
|
|
Directory.GetFileSystemEntries (loadLocation, "*.png") |
|
|
|
Directory.GetFileSystemEntries (loadLocation, "*.png") |
|
|
|
|
|
|
|
|
|
|
@ -97,6 +98,15 @@ |
|
|
|
|> Async.RunSynchronously |
|
|
|
|> Async.RunSynchronously |
|
|
|
(File.Exists sPath) = true |
|
|
|
(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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
[<Property>] |
|
|
|
let ``Can return a collection of points which represent a grids horizontal lines`` () = |
|
|
|
let ``Can return a collection of points which represent a grids horizontal lines`` () = |
|
|
|
let result = determineHorizontalLines (newNum()) (newNum()) (newNum()) |
|
|
|
let result = determineHorizontalLines (newNum()) (newNum()) (newNum()) |
|
|
@ -115,7 +125,7 @@ |
|
|
|
open System |
|
|
|
open System |
|
|
|
open System.IO |
|
|
|
open System.IO |
|
|
|
|
|
|
|
|
|
|
|
(* This test is a precaution (a test for the tests if you will...). |
|
|
|
(* This test is a pre-test test (a test for the tests if you will...). |
|
|
|
It is here to make sure the property test has what it needs to run. |
|
|
|
It is here to make sure the property test has what it needs to run. |
|
|
|
If the property test fails, here is a good place to start. |
|
|
|
If the property test fails, here is a good place to start. |
|
|
|
See script.fs (in Test Centre) for information on populating the |
|
|
|
See script.fs (in Test Centre) for information on populating the |
|
|
@ -126,7 +136,7 @@ |
|
|
|
let imagesAreThere = if length < 100 then false else true |
|
|
|
let imagesAreThere = if length < 100 then false else true |
|
|
|
Assert.True imagesAreThere |
|
|
|
Assert.True imagesAreThere |
|
|
|
|
|
|
|
|
|
|
|
(* This test is a precaution. If the property tests fails, here is a |
|
|
|
(* 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 |
|
|
|
good place to start. The easiest way to get this test to pass is to |
|
|
|
create a folder called "SavingTestArea" in this projects folder |
|
|
|
create a folder called "SavingTestArea" in this projects folder |
|
|
|
(at the root). You can, also, see script.fs (in Test Centre) for |
|
|
|
(at the root). You can, also, see script.fs (in Test Centre) for |
|
|
|