Class JetAssert


  • public final class JetAssert
    extends java.lang.Object
    Assert methods that throw exceptions similar to those thrown by JUnit.
    Since:
    Jet 3.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void assertEquals​(java.lang.String message, java.lang.Object expected, java.lang.Object actual)
      Asserts that the two given objects are equal, when compared using Object.equals(Object).
      static void assertFalse​(java.lang.String message, boolean condition)
      Asserts that the given condition is false.
      static void assertSame​(java.lang.String message, java.lang.Object expected, java.lang.Object actual)
      Asserts that the two given objects are the same, when compared using the == operator and if not, an AssertionError is thrown with the given message.
      static void assertTrue​(java.lang.String message, boolean condition)
      Asserts that the given condition is true.
      static void fail​(java.lang.String message)
      Throws an AssertionError with the given message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • assertTrue

        public static void assertTrue​(@Nullable
                                      java.lang.String message,
                                      boolean condition)
        Asserts that the given condition is true. If not, an AssertionError is thrown with the given message.
      • assertFalse

        public static void assertFalse​(@Nullable
                                       java.lang.String message,
                                       boolean condition)
        Asserts that the given condition is false. If not, an AssertionError is thrown with the given message.
      • assertSame

        public static void assertSame​(@Nullable
                                      java.lang.String message,
                                      @Nullable
                                      java.lang.Object expected,
                                      @Nullable
                                      java.lang.Object actual)
        Asserts that the two given objects are the same, when compared using the == operator and if not, an AssertionError is thrown with the given message.
      • assertEquals

        public static void assertEquals​(@Nullable
                                        java.lang.String message,
                                        @Nullable
                                        java.lang.Object expected,
                                        @Nullable
                                        java.lang.Object actual)
        Asserts that the two given objects are equal, when compared using Object.equals(Object). If they are not equal, an AssertionError is thrown with the given message.
      • fail

        public static void fail​(@Nullable
                                java.lang.String message)
        Throws an AssertionError with the given message.