public void CountNumberOfDistinctWords() { DistinctWords dWordObj = new DistinctWords(); CaseConversion caseObj = new CaseConversion(); string userString; string[] outputArray = caseObj.TakeInputStrings(out userString); int distinctCount = dWordObj.GetDistinctCount(outputArray); Console.WriteLine("Number of distinct words in your array \'{0}\' are: {1}", userString, distinctCount); }
public void CountNumberOfWords() { StringWords wordObj = new StringWords(); CaseConversion caseObj = new CaseConversion(); string userString; string[] outputArray = caseObj.TakeInputStrings(out userString); int numberOfWords = wordObj.GetCount(outputArray); Console.WriteLine("Number of words in your string \'{0}\' are: {1}", userString, numberOfWords); }
public void UnitTestCases() { CaseConversion caseObj = new CaseConversion(); string userString; string[] outputArray = caseObj.TakeInputStrings(out userString); string camelString = caseObj.ConvertToCamelCase(outputArray); Console.WriteLine("String in camelCase: {0}", camelString); string titleStringDefault = caseObj.ConvertToTitleDefault(userString); Console.WriteLine("String in Title Case using in-built function: {0}", titleStringDefault); string titleString = caseObj.ConvertToTitleCase(outputArray); Console.WriteLine("String in Title Case: {0}", titleString); }