public void Test100CharLimit() { _storage.Clear(); Dictionary<string, int> testDict = new Dictionary<string, int>(); testDict.Add("this", 33); testDict.Add("is", 33); testDict.Add("a", 16); testDict.Add("statement", 16); testDict.Add("including5", 16); testDict.Add("and", 16); testDict.Add("so", 16); testDict.Add("but", 16); testDict.Add("not", 16); IProcessor processor = new Processor(); string input = @"This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is a statement, and so: is this, including5, but not #e@ This is."; processor.GetInput(input); processor.ShowStatistics(Display); Assert.IsTrue(StatisticCheck(testDict)); }
public void TestSentenceSuccess() { IProcessor processor = new Processor(); string input = "This is a statement, and so is this."; processor.GetInput(input); processor.ShowStatistics(Display); }
public void TestSentenceFailure2() { IProcessor processor = new Processor(); string input = ""; processor.GetInput(input); processor.ShowStatistics(Display); }
static void Main(string[] args) { //This can be wired via spring to accomodate extended use cases as mentioned in README.docs //which can take filename as an input and process the stream event based IProcessor processor = new Processor(); Console.Write("Please enter the sentence to analyse:"); string input = Console.ReadLine(); processor.GetInput(input); processor.ShowStatistics(Display); Console.ReadKey(); }
public void TestNumberFilter() { _storage.Clear(); Dictionary<string, int> testDict = new Dictionary<string, int>(); testDict.Add("this", 2); testDict.Add("is", 2); testDict.Add("a", 1); testDict.Add("statement", 1); testDict.Add("including", 1); testDict.Add("and", 1); testDict.Add("so", 1); IProcessor processor = new Processor(); string input = "This is a statement, and so is this, including 45."; processor.GetInput(input); processor.ShowStatistics(Display); Assert.IsTrue(StatisticCheck(testDict)); }