Browse Source

Added a InputGeneration module to Test Centre.

Removing code from tests has not been done yet.
master
Craig Oates 6 years ago
parent
commit
f569742330
  1. 17
      TestCentre/InputGeneration.fs
  2. 1
      TestCentre/TestCentre.fsproj

17
TestCentre/InputGeneration.fs

@ -0,0 +1,17 @@
module InputGeneration
open System
let ValidGibberishLevelInput () =
let testInputs = [|2 .. 20|]
let index = Random().Next(0, testInputs.Length)
testInputs.[index]
let ValidSentencesInput () = System.Random().Next(2, 10)
let InvalidGibberishInput () =
let testInputs = Array.concat [ [|0; 1|] ; [|21 .. 100|] ]
let index = System.Random().Next(0, testInputs.Length)
testInputs.[index]
let InvalidSentencesInput () = System.Random().Next(-5, 1)

1
TestCentre/TestCentre.fsproj

@ -61,6 +61,7 @@
<Content Include="TextFiles\test-post.txt" />
<Compile Include="AssemblyInfo.fs" />
<Compile Include="TestingConstants.fs" />
<Compile Include="InputGeneration.fs" />
<Compile Include="UnitTests.fs" />
<Compile Include="PropertyTests.fs" />
<None Include="Script.fsx" />

Loading…
Cancel
Save