diff --git a/TestCentre/PropertyTests.fs b/TestCentre/PropertyTests.fs index fed5bf6..c69b2ce 100644 --- a/TestCentre/PropertyTests.fs +++ b/TestCentre/PropertyTests.fs @@ -11,9 +11,9 @@ (* End of Session Note - Monday 23rd July ================================================================================================================== - [] Remove the "contains a full stop" tests -- no longer needed due to change in functionality. + [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. - [] Double check UnitTests.fs + [x] Double check UnitTests.fs *) module ``Null Tests`` = @@ -103,6 +103,14 @@ let results () = Assert.Equal(desiredSentencesCount , test()) Check.Quick (results()) + [] + let ``CleanResult returns a string which ends with the correct end-token`` () = + let test () = + Pancake.CleanResultAsync (DefaultSentenceCount()) DefaultTestSentence + |> Async.RunSynchronously + |> EndsAsIntended + let results () = Assert.True(test()) + Check.Quick (results()) [] let ``RequestAllTemplateFiles does not return an empty list`` () = diff --git a/TestCentre/UnitTests.fs b/TestCentre/UnitTests.fs index 3fe7f0d..808249d 100644 --- a/TestCentre/UnitTests.fs +++ b/TestCentre/UnitTests.fs @@ -114,11 +114,11 @@ [] let ``CleanResult returns a string which ends with the correct end-token`` () = - let result () = + let result = Pancake.CleanResultAsync (DefaultSentenceCount()) DefaultTestSentence |> Async.RunSynchronously |> EndsAsIntended - Assert.True(result()) + Assert.True(result) [] let ``CleanResult returns intended number of sentences`` () = diff --git a/WetPancake/DataCleaning.fs b/WetPancake/DataCleaning.fs index 7b8a1f3..ed1da7f 100644 --- a/WetPancake/DataCleaning.fs +++ b/WetPancake/DataCleaning.fs @@ -6,4 +6,4 @@ let SplitText pattern text = Regex.Split(text, pattern) - let TrimEnd charArray (text: string) = text.TrimEnd charArray //[|' '|] \ No newline at end of file + let TrimEnd charArray (text: string) = text.TrimEnd charArray \ No newline at end of file