Browse Source

Wrote unit test for RequestCleanTextFromFile -- test-post.

The unit tests have caught a sporadic OBOB in the RequestCleanTextFromFile function. The splitting of the text to clean it is not 100% right.
master
Craig Oates 6 years ago
parent
commit
e6cc19646f
  1. 13
      TestCentre/UnitTests.fs

13
TestCentre/UnitTests.fs

@ -153,7 +153,7 @@
Assert.Equal(desiredSentencesCount, result)
[<Fact>]
let ``RequestCleanTextFromFile returns intended numbe of sentences when using console-waterworks-announcement`` () =
let ``RequestCleanTextFromFile returns intended number of sentences when using console-waterworks-announcement`` () =
let desiredSentencesCount = (ValidSentencesInput())
let result =
Pancake.RequestCleanTextFromFileAsync (ValidGibberishLevelInput()) desiredSentencesCount ConsoleWaterworks
@ -162,13 +162,22 @@
Assert.Equal(desiredSentencesCount, result)
[<Fact>]
let ``RequestCleanTextFromFile returns intended numbe of sentences when using desktop-clock-info`` () =
let ``RequestCleanTextFromFile returns intended number of sentences when using desktop-clock-info`` () =
let desiredSentencesCount = (ValidSentencesInput())
let result =
Pancake.RequestCleanTextFromFileAsync (ValidGibberishLevelInput()) desiredSentencesCount DesktopClock
|> Async.RunSynchronously
|> countSentences
Assert.Equal(desiredSentencesCount, result)
[<Fact>]
let ``RequestCleanTextFromFile returns intended number of sentences when using test-post`` () =
let desiredSentencesCount = (ValidSentencesInput())
let result =
Pancake.RequestCleanTextFromFileAsync (ValidGibberishLevelInput()) desiredSentencesCount TestPost
|> Async.RunSynchronously
|> countSentences
Assert.Equal(desiredSentencesCount, result)
// YOU ARE HERE...
// - ADD TESTS FOR "CLEANING" FUNCTIONS

Loading…
Cancel
Save