public void can_create_phrase_maker_with_file_store() { var factory = new PhraseMakerFactory(); var phraseMaker = factory.Create("no-nb"); string phrase = phraseMaker.GeneratePhrase(); Assert.That(phrase, Is.Not.Null); }
static void Main(string[] args) { if(args.Length < 1) { System.Console.WriteLine("Please supply a path to a word-store"); return; } var factory = new PhraseMakerFactory(); var path = args[0]; var phraseMaker = factory.Create(path); System.Console.WriteLine("Press 'q' to exit."); ConsoleKeyInfo key = System.Console.ReadKey(); while(key.KeyChar != 'q') { System.Console.WriteLine(phraseMaker.GeneratePhrase()); key = System.Console.ReadKey(); } }