Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-3090

Normalize test cases where expect an exception

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.6
    • Fix Version/s: 1.4.7
    • Component/s: None
    • Labels:
      None

      Description

      Many test cases uses the following logic to test if an exception has been thrown:

      try {
            <do something>
            fail("Expected exception");
          } catch (someException e) {
            // expected
          }
        }
      

      This form is not self-explanatory enough and could be replaced by a one line ExpectedException check which would be more clean.

        Attachments

          Activity

            People

            • Assignee:
              BoglarkaEgyed Boglarka Egyed
              Reporter:
              BoglarkaEgyed Boglarka Egyed
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: