def testRepeatQuickBrown6Times(self): string_to_repeat = "Quick Brown" number_of_times_to_repeat = 6 expected = string_to_repeat * number_of_times_to_repeat actual = StringUtils.repeat_string(string_to_repeat, number_of_times_to_repeat) self.assertEqual(expected, actual)
def testRepeatHello5Times(self): string_to_repeat = "Hello" number_of_times_to_repeat = 5 expected = string_to_repeat * number_of_times_to_repeat actual = StringUtils.repeat_string(string_to_repeat, number_of_times_to_repeat) self.assertEqual(expected, actual)
def pad_right20Test(self): hello = "The quick" number_of_units_to_pad = 20 expected = "The quick " actual = StringUtils.pad_right(hello, number_of_units_to_pad) self.assertEqual(expected, actual)
def pad_left10Test(self): hello = "hello" number_of_units_to_pad = 10 expected = " hello" actual = StringUtils.pad_left(hello, number_of_units_to_pad) self.assertEqual(expected, actual)
def pad_right15Test(self): hello = "" number_of_units_to_pad = 15 expected = " " actual = StringUtils.pad_right(hello, number_of_units_to_pad) self.assertEqual(expected, actual)
def specialCharacterStringTest1(self): alpha_string = "!&*(" outcome = StringUtils.is_special_character_string(alpha_string) self.assertTrue(outcome)
def specialCharacterStringTest2(self): alpha_string = "Over the lazy dog!" outcome = StringUtils.is_special_character_string(alpha_string) self.assertFalse(outcome)
def alpha_stringTest1(self): alpha_string = "The quick brown fox jumps" outcome = StringUtils.is_special_character_string(alpha_string) self.assertFalse(outcome)
def numericStringTest1(self): alpha_string = "1234" outcome = StringUtils.is_special_character_string(alpha_string) self.assertFalse(outcome)
def alpha_stringTest2(self): alpha_string = "Over the lazy dog" outcome = StringUtils.is_numeric_string(alpha_string) self.assertFalse(outcome)
def alpha_stringTest1(self): alpha_string = "The quick brown fox jumps" outcome = StringUtils.is_numeric_string(alpha_string) self.assertFalse(outcome)
def numericStringTest1(self): alpha_string = "1234" outcome = StringUtils.is_alpha_string(alpha_string) self.assertFalse(outcome)
def alpha_stringTest2(self): alpha_string = "Over the lazy dog" outcome = StringUtils.is_alpha_string(alpha_string) self.assertTrue(outcome)
def alpha_stringTest1(self): alpha_string = "The quick brown fox jumps" outcome = StringUtils.is_alpha_string(alpha_string) self.assertTrue(outcome)