TextConverter.java
/**
     *  tests actionReverse method with various cases to ensure it is working
     *  correctly.
     */
tests actionReverse method with various cases to ensure it is working
correctly.
tests actionReverse method with various cases to ensure it is working correctly .
public static void testActionReverse() {
        boolean error = false;
        String input1 = "Abc";
        String expected1 = "CBa";
        String result1 = actionReverse( input1);
        if ( !result1.equals( expected1)) {
            error = true;
            System.out.println("1) testActionReverse with input " + input1 + ", expected: " +
                    expected1 + " but result: " + result1);
        }
        String input2 = "CS 200";
        String expected2 = "002 sc";
        String result2 = actionReverse(input2);
        if ( !result2.equals( expected2)) {
            error = true;
            System.out.println("2) testActionReverse with input " + input2 + ", expected: " +
                    expected2 + " but result: " + result2);
        }
        String input3 = "$$__OO";
        String expected3 = "oo__$$";
        String result3 = actionReverse(input3);
        if ( !result3.equals( expected3)) {
            error = true;
            System.out.println("3) testActionReverse with input " + input3 + ", expected: " +
                    expected3 + " but result: " + result3);
        }
        if ( error) {
            System.out.println( "testActionReverse failed");
        } else {
            System.out.println("testActionReverse passed");
        }
    }
public static void testActionReverse ( ) { boolean error = false ; String input1 = "Abc" ; String expected1 = "CBa" ; String result1 = actionReverse ( input1 ) ; if ( ! result1 . equals ( expected1 ) ) { error = true ; System . out . println ( "1) testActionReverse with input " + input1 + ", expected: " + expected1 + " but result: " + result1 ) ; } String input2 = "CS 200" ; String expected2 = "002 sc" ; String result2 = actionReverse ( input2 ) ; if ( ! result2 . equals ( expected2 ) ) { error = true ; System . out . println ( "2) testActionReverse with input " + input2 + ", expected: " + expected2 + " but result: " + result2 ) ; } String input3 = "$$__OO" ; String expected3 = "oo__$$" ; String result3 = actionReverse ( input3 ) ; if ( ! result3 . equals ( expected3 ) ) { error = true ; System . out . println ( "3) testActionReverse with input " + input3 + ", expected: " + expected3 + " but result: " + result3 ) ; } if ( error ) { System . out . println ( "testActionReverse failed" ) ; } else { System . out . println ( "testActionReverse passed" ) ; } }
tests actionReverse method with various cases to ensure it is working
  correctly.
tests actionReverse method with various cases to ensure it is working correctly .