diff --git a/TestCentre/LibraryTests.fs b/TestCentre/LibraryTests.fs index b0a3de0..ee19b4a 100644 --- a/TestCentre/LibraryTests.fs +++ b/TestCentre/LibraryTests.fs @@ -34,6 +34,9 @@ let loadLocation = __SOURCE_DIRECTORY__ + "/LoadingTestArea" let saveLocation = __SOURCE_DIRECTORY__ + "/SavingTestArea" + let fixedSkiaImagePath = + (loadLocation + "/RequiredInfo/Skia-599x336.png") + let allColours = let properties = typeof.GetProperties @@ -105,6 +108,7 @@ open DeathSocket.GridPainter open TestingHelpers open FsCheck.Xunit + open SkiaSharp (* With regards to the "saving images" tests, you should end up with one image left over in the SavingTestArea folder. Comment out the @@ -219,6 +223,18 @@ let result = determineSKVerticalLines (newNum()) (newNum()) (newNum()) result.Length > 0 + [] + let ``Can create a populated SKData buffer when calling createSKDataAsync with SkiaBuffer`` () = + let result () = + SkiaBuffer ({ filePath = fixedSkiaImagePath + skColour = randomSKColour () + penWidth = float32 (newPenWidth()) + rows = newNum () + columns = newNum () }) + |> createSKDataAsync + |> Async.RunSynchronously + (result ()).IsEmpty = false + module UnitTests = open System