public void TestPathingString7() { SpeechService SpeechService = new SpeechService(); string pathingString = @"[{TXT:Ship model} {TXT:Ship callsign (spoken)};This is {TXT:Ship model} {TXT:Ship callsign (spoken)}] [requesting docking permission;requesting docking clearance;requesting permission to dock;requesting clearance to dock]."; List <string> pathingOptions = new List <string>() { "{TXT:Ship model} {TXT:Ship callsign (spoken)} requesting docking permission." , "This is {TXT:Ship model} {TXT:Ship callsign (spoken)} requesting docking permission." , "{TXT:Ship model} {TXT:Ship callsign (spoken)} requesting docking clearance." , "This is {TXT:Ship model} {TXT:Ship callsign (spoken)} requesting docking clearance." , "{TXT:Ship model} {TXT:Ship callsign (spoken)} requesting clearance to dock." , "This is {TXT:Ship model} {TXT:Ship callsign (spoken)} requesting clearance to dock." , "{TXT:Ship model} {TXT:Ship callsign (spoken)} requesting permission to dock." , "This is {TXT:Ship model} {TXT:Ship callsign (spoken)} requesting permission to dock." }; HashSet <string> pathingResults = new HashSet <string>(); for (int i = 0; i < 1000; i++) { string pathedString = SpeechService.SpeechFromScript(pathingString); pathingResults.Add(pathedString); } Assert.IsTrue(pathingResults.SetEquals(new HashSet <string>(pathingOptions))); }
public void TestPathingString4() { SpeechService SpeechService = new SpeechService(); string pathingString = @";;;;;;Seven;;;"; List <string> pathingOptions = new List <string>() { "" , "Seven" }; int sevenCount = 0; for (int i = 0; i < 10000; i++) { string pathedString = SpeechService.SpeechFromScript(pathingString); if (pathedString == "Seven") { sevenCount++; } } Assert.IsTrue(sevenCount > 750); Assert.IsTrue(sevenCount < 1500); }
public void TestPathingString3() { SpeechService SpeechService = new SpeechService(); string pathingString = @"There [are;might be;could be] [4;5;] lights;It's dark in here;"; List <string> pathingOptions = new List <string>() { "There are 4 lights" , "There are 5 lights" , "There are lights" , "There might be 4 lights" , "There might be 5 lights" , "There might be lights" , "There could be 4 lights" , "There could be 5 lights" , "There could be lights" , "It's dark in here" , "" }; HashSet <string> pathingResults = new HashSet <string>(); for (int i = 0; i < 1000; i++) { string pathedString = SpeechService.SpeechFromScript(pathingString); pathingResults.Add(pathedString); } Assert.IsTrue(pathingResults.SetEquals(new HashSet <string>(pathingOptions))); }
public void TestPathingString6() { string pathingString = @"[There can be only one.]"; List <string> pathingOptions = new List <string>() { "There can be only one." }; HashSet <string> pathingResults = new HashSet <string>(); for (int i = 0; i < 1000; i++) { string pathedString = SpeechService.SpeechFromScript(pathingString); pathingResults.Add(pathedString); } Assert.IsTrue(pathingResults.SetEquals(new HashSet <string>(pathingOptions))); }
public void TestPathingString5() { string pathingString = @"You leave me [no choice]."; List <string> pathingOptions = new List <string>() { "You leave me no choice." }; HashSet <string> pathingResults = new HashSet <string>(); for (int i = 0; i < 1000; i++) { string pathedString = SpeechService.SpeechFromScript(pathingString); pathingResults.Add(pathedString); } Assert.IsTrue(pathingResults.SetEquals(new HashSet <string>(pathingOptions))); }
public void TestPathingString1() { string pathingString = @"There are [4;5] lights"; List <string> pathingOptions = new List <string>() { "There are 4 lights" , "There are 5 lights" }; HashSet <string> pathingResults = new HashSet <string>(); for (int i = 0; i < 1000; i++) { string pathedString = SpeechService.SpeechFromScript(pathingString); pathingResults.Add(pathedString); } Assert.IsTrue(pathingResults.SetEquals(new HashSet <string>(pathingOptions))); }