/**
 * Test code for MethodsPractice, to be fleshed out by the student.
 * 
 * TODO: add more tests to main
 */
public class MethodsPracticeTests {

    /**
     * Print a message depending on if test passed.
     *
     * @param correct True if test counts as correct.
     */
    public static void printTest(boolean correct) {
        if (correct) {
            System.out.println("Test passed");
        } else {
            System.out.println("TEST FAILED!");
        }
    }

    /**
     * This code tests your program's completeness.
     *
     * @param args Ignored
     */
    public static void main(String[] args) {
        // Some lines in this method may be over 80 chars, but I chose to
        // do that to make it easier to comment out individual
        // tests. The course coding standards still apply to the code
        // that you write in MethodsPractice

        System.out.println("Testing maxOfThree");
        printTest(MethodsPractice.maxOfThree(1, 2, 3) == 3);
        // TODO: write more tests

        System.out.println("Testing reverseString");
        printTest(MethodsPractice.reverseString("Hello, World!").equals("!dlroW ,olleH"));
        // TODO: write more tests

        // Uncomment these tests AFTER IMPLEMENTING isLetterOrDigit
//       System.out.println("Testing isLetterOrDigit");
//       printTest(MethodsPractice.isLetterOrDigit('a'));
//       printTest(!MethodsPractice.isLetterOrDigit('&'));
//       // TODO: write more tests

        // Uncomment these tests AFTER IMPLEMENTING getLettersAndDigits
//       System.out.println("Testing getLettersAndDigits");
//       printTest(MethodsPractice.getLettersAndDigits("Look at that! We've seen 7 seas, see?").equals("LookatthatWeveseen7seassee"));
//       // TODO: write more tests

        // Uncomment these tests AFTER IMPLEMENTING isPalindromePhrase
//       System.out.println("Testing isPalindromePhrase");
//       printTest(!MethodsPractice.isPalindromePhrase("banana"));
//       printTest(MethodsPractice.isPalindromePhrase("A man, a plan, a canal, Panama!"));
//       // TDDO: write more tests

       System.out.println("Testing averageEvenNumbers");
       printTest( MethodsPractice.averageEvenNumbers(12, 13, 12, 13, 12) == 12.0);
       // TODO: write more tests

        // Uncomment these tests AFTER IMPLEMENTING getTotalBill
//       System.out.println("Testing getTotalBill");
//       printTest(MethodsPractice.getTotalBill(120, 0.32) == 158.4);
//       // TODO: write more tests

        // Uncomment these tests AFTER IMPLEMENTING solveQuadratic
//       System.out.println("Testing solveQuadratic");
//       printTest(MethodsPractice.solveQuadratic(0.11, -0.22, 0.033) == 1.8366600265340756);
//       // TODO: write more tests
    }
}
