The purpose of this repository is to provide a way for people to create placeholder images quickly.
https://www.craigoates.net/Software/project/11
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
namespace ConsoleTests |
|
|
|
module PropertyTests = |
|
|
|
open FsCheck |
|
open FsCheck.Xunit |
|
open Validation |
|
open System |
|
open SmoulderingBeachBall.Domain.DomainTypes |
|
open System.Drawing |
|
|
|
[<Property>] |
|
let ``buildDefaultSpec creates intended type`` () = |
|
let width = Random().Next() |
|
let height = Random().Next() |
|
let oSpec = |
|
{ colour = Brushes.Black |
|
overlayType = Full } |
|
let defaultSpec = |
|
{ width = width |
|
height = height |
|
colour = Brushes.AntiqueWhite |
|
filePath = getDesktopPath |
|
overlay = Some oSpec |
|
} |
|
let spec = buildDefaultSpec width height |
|
defaultSpec = spec |
|
|
|
Check.Quick (``buildDefaultSpec creates intended type`` ()) |
|
|
|
module UnitTests = |
|
|
|
open Xunit |
|
open Validation |
|
open System |
|
|
|
[<Fact>] |
|
let ``Colour map is not empty`` () = |
|
Assert.NotEmpty colourList |
|
|
|
[<Fact>] |
|
let ``getDesktopPath returns desktop path`` () = |
|
let expectedPath = |
|
Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) |
|
Assert.Equal (expectedPath, getDesktopPath) |