public void ProcessAddressTestTest_ShouldSortResultsBasedOnStreetName() { //---------------Set up test pack------------------- ProcessAddress processAddress = new ProcessAddress(); processAddress.AddressBooks = _readExcel.GetDataRows(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- processAddress.SortAddress(); //---------------Test Result ----------------------- StringAssert.AreEqualIgnoringCase("AgriSETA House 529 Belvedere Road Arcadia 0083", processAddress.Address[0]); StringAssert.AreEqualIgnoringCase("12th Floor Durban Bay House 333 Smith Street Durban", processAddress.Address[1]); }
public void ProcessWordStatsTest_ShouldCalculateWordFrequency_SortResults() { //---------------Set up test pack------------------- ProcessWordStats processWordStats = new ProcessWordStats(); processWordStats.AddressBooks = _readExcel.GetDataRows(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- processWordStats.CalculateStats(); //---------------Test Result ----------------------- Assert.AreEqual(3, processWordStats.WordStats.Count); StringAssert.AreEqualIgnoringCase("Sashen", processWordStats.WordStats[0].Word); Assert.AreEqual(2, processWordStats.WordStats[0].Count); StringAssert.AreEqualIgnoringCase("Naidoo", processWordStats.WordStats[1].Word); }