Advertisement
vmeansdev

Test helper methods

Sep 11th, 2019
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1.     /*
  2.         TEST helper methods
  3.      */
  4.  
  5.     private static void test(boolean condition, String description) {
  6.         try {
  7.             check(condition, description);
  8.         } catch (Exception ex) {
  9.             ex.printStackTrace();
  10.         }
  11.     }
  12.  
  13.     private static void check(boolean condition, String description) throws Exception {
  14.         if (!condition) {
  15.             throw new Exception(description);
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement