Class SensitiveResult

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void assertEquals​(short val)
      Asserts the stored result to be a short value equal to the provided short value.
      static void assertEquals​(Object obj)
      Asserts the stored result to be an object reference equal to the provided object reference.
      static void assertFalse()
      Asserts the stored result to be a boolean value equal to false.
      static void assertGreaterThan​(short val)
      Asserts the stored result to be a short value strictly greater than the provided short value.
      static void assertLessThan​(short val)
      Asserts the stored result to be a short value strictly less than the provided short value.
      static void assertNegative()
      Asserts the stored result to be a short value strictly negative.
      static void assertPositive()
      Asserts the stored result to be a short value strictly positive.
      static void assertTrue()
      Asserts the stored result to be a boolean value equal to true.
      static void assertZero()
      Asserts the stored result to be a short value equal to zero.
      static void reset()
      Resets the stored result.
    • Method Detail

      • assertEquals

        public static void assertEquals​(Object obj)
                                 throws SecurityException
        Asserts the stored result to be an object reference equal to the provided object reference. This method throws an exception if and only if the stored result reference res and the provided object reference obj do not refer to the same object or are not both null; in other words (res == obj) evaluates to false.
        Parameters:
        obj - The object reference to compare with the stored result.
        Throws:
        SecurityException - if the provided object reference is not equal to that of the stored result.
      • assertTrue

        public static void assertTrue()
                               throws SecurityException
        Asserts the stored result to be a boolean value equal to true.
        Throws:
        SecurityException - if the stored result is not set to true.
      • assertFalse

        public static void assertFalse()
                                throws SecurityException
        Asserts the stored result to be a boolean value equal to false.
        Throws:
        SecurityException - if the stored result is not set to false.
      • assertNegative

        public static void assertNegative()
                                   throws SecurityException
        Asserts the stored result to be a short value strictly negative. A call to this method is semantically equivalent to a call to assertLessThan(short) with parameter 0.
        Throws:
        SecurityException - if the stored result is not negative.
      • assertPositive

        public static void assertPositive()
                                   throws SecurityException
        Asserts the stored result to be a short value strictly positive. A call to this method is semantically equivalent to a call to assertGreaterThan(short) with parameter 0.
        Throws:
        SecurityException - if the stored result is not positive.
      • assertZero

        public static void assertZero()
                               throws SecurityException
        Asserts the stored result to be a short value equal to zero. A call to this method is semantically equivalent to a call to assertEquals(short) with parameter 0.
        Throws:
        SecurityException - if the stored result is not zero.
      • assertEquals

        public static void assertEquals​(short val)
                                 throws SecurityException
        Asserts the stored result to be a short value equal to the provided short value.
        Parameters:
        val - The short value to compare with the stored result.
        Throws:
        SecurityException - if the provided value is not equal to that of the stored result.
      • assertGreaterThan

        public static void assertGreaterThan​(short val)
                                      throws SecurityException
        Asserts the stored result to be a short value strictly greater than the provided short value.
        Parameters:
        val - The short value to compare with the stored result.
        Throws:
        SecurityException - if the provided value is not greater than that of the stored result.
      • assertLessThan

        public static void assertLessThan​(short val)
                                   throws SecurityException
        Asserts the stored result to be a short value strictly less than the provided short value.
        Parameters:
        val - The short value to compare with the stored result.
        Throws:
        SecurityException - if the provided value is not less than that of the stored result.
      • reset

        public static void reset()
        Resets the stored result. The stored result is tagged as Unassigned and any subsequent assertion of the result will fail.