|
|
|
@ -12,7 +12,7 @@
|
|
|
|
|
(* End of Session Note - Monday 23rd July/Tuesday 24th July |
|
|
|
|
================================================================================================================== |
|
|
|
|
[x] Remove the "contains a full stop" tests -- no longer needed due to change in functionality. |
|
|
|
|
[...] Update the "end with a full-stop" tests -- expanded the way a sentence can end. |
|
|
|
|
[x] Update the "end with a full-stop" tests -- expanded the way a sentence can end. |
|
|
|
|
[...] Add returns intended sentences for "clean" functions. |
|
|
|
|
[x] Double check UnitTests.fs |
|
|
|
|
*) |
|
|
|
@ -140,8 +140,6 @@
|
|
|
|
|
let results = Assert.Equal(desiredSentencesCount, test()) |
|
|
|
|
Check.Quick results |
|
|
|
|
|
|
|
|
|
// clean text from file ends with correct end-token |
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
let ``RequestCleanTextFromFile returns a string which ends with the correct end-token when using console-waterworks-announcement`` () = |
|
|
|
|
let test () = |
|
|
|
@ -178,11 +176,47 @@
|
|
|
|
|
let results () = Assert.True(test()) |
|
|
|
|
Check.Quick (results()) |
|
|
|
|
|
|
|
|
|
// end of correct end-token tests |
|
|
|
|
// clean text from file returns intended sent. |
|
|
|
|
|
|
|
|
|
// ========================================================================================================== |
|
|
|
|
[<Property>] |
|
|
|
|
let ``RequestCleanTextFromFile returns intended number of strings when using console-waterworks-announcement`` () = |
|
|
|
|
let desiredSentencesCount = (ValidSentencesInput()) |
|
|
|
|
let test () = |
|
|
|
|
Pancake.RequestCleanTextFromFileAsync (ValidGibberishLevelInput()) desiredSentencesCount ConsoleWaterworks |
|
|
|
|
|> Async.RunSynchronously |
|
|
|
|
|> CountSentences |
|
|
|
|
let results () = Assert.Equal(desiredSentencesCount, test()) |
|
|
|
|
Check.Quick (results()) |
|
|
|
|
|
|
|
|
|
// clean text from file returns intended sent. |
|
|
|
|
[<Property>] |
|
|
|
|
let ``RequestCleanTextFromFile returns intended number of strings when using desktop-clock-info`` () = |
|
|
|
|
let desiredSentencesCount = (ValidSentencesInput()) |
|
|
|
|
let test () = |
|
|
|
|
Pancake.RequestCleanTextFromFileAsync (ValidGibberishLevelInput()) desiredSentencesCount DesktopClock |
|
|
|
|
|> Async.RunSynchronously |
|
|
|
|
|> CountSentences |
|
|
|
|
let results () = Assert.Equal(desiredSentencesCount, test()) |
|
|
|
|
Check.Quick (results()) |
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
let ``RequestCleanTextFromFile returns intended number of strings when using test-post`` () = |
|
|
|
|
let desiredSentencesCount = (ValidSentencesInput()) |
|
|
|
|
let test () = |
|
|
|
|
Pancake.RequestCleanTextFromFileAsync (ValidGibberishLevelInput()) desiredSentencesCount TestPost |
|
|
|
|
|> Async.RunSynchronously |
|
|
|
|
|> CountSentences |
|
|
|
|
let results () = Assert.Equal(desiredSentencesCount, test()) |
|
|
|
|
Check.Quick (results()) |
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
let ``RequestCleanTextFromFile returns intended number of strings when using word-generator`` () = |
|
|
|
|
let desiredSentencesCount = (ValidSentencesInput()) |
|
|
|
|
let test () = |
|
|
|
|
Pancake.RequestCleanTextFromFileAsync (ValidGibberishLevelInput()) desiredSentencesCount WordGenerator |
|
|
|
|
|> Async.RunSynchronously |
|
|
|
|
|> CountSentences |
|
|
|
|
let results () = Assert.Equal(desiredSentencesCount, test()) |
|
|
|
|
Check.Quick (results()) |
|
|
|
|
|
|
|
|
|
// end of intended sent. tests |
|
|
|
|
|
|
|
|
|