public void TestForTextListSplitter() { ConsoleReader consoleReader = new ConsoleReader(); consoleReader.DataList = new List <string> { "Data Type Value", "Day : 11", "Month : 11", "Year: 2011", "Hour:05", "Minute:11" }; TextListSplitter textListSplitter = new TextListSplitter(consoleReader.DataList); Assert.True(textListSplitter.IsListSpliited); }
public void WhenAggregatorCalledThenCallFunctions() { ConsoleReader consoleReader = new ConsoleReader(); consoleReader.DataList = new List <string> { "Data Type Value", "Day : 11", "Month : 11", "Year: 2011", "Hour:05", "Minute:11" }; TextListSplitter textListSplitter = new TextListSplitter(consoleReader.DataList); Aggregator aggregator = new Aggregator(textListSplitter); Assert.True(aggregator.IsAggregatorCalled); aggregator.AverageFootfallsPerHourShownOverADay(textListSplitter, "11/11/2011"); Assert.True(aggregator.CheckAverageFootfallsPerHourShownOverADay); aggregator.AverageDailyFootfallsInAWeek(textListSplitter, "11/11/2011"); Assert.True(aggregator.CheckAverageDailyFootfallsInAWeek); aggregator.PeakDailyFootfallInTheLastMonth(textListSplitter, "11 2011"); Assert.True(aggregator.CheckPeakDailyFootfallInTheLastMonth); }
public void WhenAggregatorSupporterCalledThenCallSupportingFunction() { AggregatorSupporter aggregatorSupporter = new AggregatorSupporter(); ConsoleReader consoleReader = new ConsoleReader(); consoleReader.DataList = new List <string> { "Data Type Value", "Day : 11", "Month : 11", "Year: 2011", "Hour:05", "Minute:11" }; TextListSplitter textListSplitter = new TextListSplitter(consoleReader.DataList); Assert.True(aggregatorSupporter.IsSupporterWork); aggregatorSupporter.GetCountPerDay(11, 11, 2011, textListSplitter, textListSplitter.DayList.Count); Assert.True(aggregatorSupporter.IsGetCountPerDayWorks); aggregatorSupporter.GetIndex(11, 11, 2011, textListSplitter, textListSplitter.DayList.Count); Assert.True(aggregatorSupporter.IsGetIndexWorks); aggregatorSupporter.GetListOfGivenMonthAndYear(11, 2011, textListSplitter, textListSplitter.DayList.Count); Assert.True(aggregatorSupporter.IsGetListOfGivenMonthAndYear); }