srinivasboga / Boga_R-D

0 stars 4 forks source link

Issue 25: Create a test cases for PrintLetters class #28

Closed srinivasboga closed 1 month ago

srinivasboga commented 1 month ago

Description Objective: There are several issues related to string handling in the PrintLetters class as highlighted by the current test cases in PrintLettersTest. Specifically, the handling of inputs with digits and empty strings needs to be reviewed.

Acceptance Criteria:

Test Cases

  1. Valid Input Test

    • Input: "a1b2c3"
    • Expected Output: "abbcc"
    • Issue: This test currently passes, but we should verify that the logic in PrintLetters handles all cases correctly.
  2. Empty String Test

    • Input: ""
    • Expected Output: "Invalid input: string is empty"
    • Issue: The output is correct, but we need to ensure this case is handled at the start of the PrintLetters.main() method.
  3. Starts With Digit Test

    • Input: "1a2b"
    • Expected Output: "Invalid input: string should not start with a digit"
    • Issue: The output is correct, but we need to validate that this check is effectively implemented.