The purpose of this repository is to provide a way for people to generate random "placeholder text" -- with a Markov Chain.
https://www.craigoates.net/Software/project/12
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.9 KiB
53 lines
1.9 KiB
namespace TestCentre |
|
|
|
module ``Unit Tests`` = |
|
|
|
open Xunit |
|
open WetPancake |
|
open TestingConstants |
|
open System.IO |
|
|
|
(*These tests check to see if the .txt files exists in the Test Centre project. |
|
The Wet Pancake library does not expose the file access functions so the .txt |
|
files are mirrored here (in Text Centre) |
|
The mirroring, also, doubles up as sample files to pass into Wet Pancake.*) |
|
[<Fact>] |
|
let ``desktop-clock-info-txt can be found`` () = |
|
let result = File.Exists DesktopClock |
|
Assert.Equal(true, result); |
|
|
|
[<Fact>] |
|
let ``console-waterworks-announcements-txt can be found`` () = |
|
let result = File.Exists ConsoleWaterworks |
|
Assert.Equal(true, result); |
|
|
|
[<Fact>] |
|
let ``word-generator-txt can be found`` () = |
|
let result = File.Exists WordGenerator |
|
Assert.Equal(true, result); |
|
|
|
|
|
[<Fact>] |
|
let ``Request Random Text does not generate a null`` () = |
|
let result = Pancake.RequestRandomText |
|
Assert.NotNull result |
|
|
|
[<Fact>] |
|
let ``Request Text does not generate a null`` () = |
|
let result = Pancake.RequestText 5 5 |
|
Assert.NotNull result |
|
|
|
[<Fact>] |
|
let ``Request Text From File does not generate a null for desktop-clock-info-txt`` () = |
|
let result = Pancake.RequestTextFromFile 5 5 DesktopClock |
|
Assert.NotNull result |
|
|
|
[<Fact>] |
|
let ``Request Text From File does not generate a null for console-waterworks-announcement-txt`` () = |
|
let result = Pancake.RequestTextFromFile 5 5 ConsoleWaterworks |
|
Assert.NotNull result |
|
|
|
[<Fact>] |
|
let ``Request Text From File does not generate a null for word-generator-txt`` () = |
|
let result = Pancake.RequestTextFromFile 5 5 WordGenerator |
|
Assert.NotNull result |