/** * Verifies that the actual value is exactly an instance of given type. * * @param info contains information about the assertion. * @param actual the given object. * @param type the type to check the actual value against. * @throws AssertionError if the actual is not exactly an instance of given type. * @throws NullPointerException if the actual value is null. * @throws NullPointerException if the given object is null. */ public void assertIsExactlyInstanceOf(AssertionInfo info, Object actual, Class<?> type) { if (!actualIsExactlyInstanceOfType(actual, type, info)) throw failures.failure(info, shouldBeExactlyInstance(actual, type)); }
/** * Verifies that the actual value is not exactly an instance of given type. * * @param info contains information about the assertion. * @param actual the given object. * @param type the type to check the actual value against. * @throws AssertionError if the actual is exactly an instance of given type. * @throws NullPointerException if the actual value is null. * @throws NullPointerException if the given object is null. */ public void assertIsNotExactlyInstanceOf(AssertionInfo info, Object actual, Class<?> type) { if (actualIsExactlyInstanceOfType(actual, type, info)) throw failures.failure(info, shouldNotBeExactlyInstance(actual, type)); }
/** * Verifies that the actual value is exactly an instance of given type. * * @param info contains information about the assertion. * @param actual the given object. * @param type the type to check the actual value against. * @throws AssertionError if the actual is not exactly an instance of given type. * @throws NullPointerException if the actual value is null. * @throws NullPointerException if the given object is null. */ public void assertIsExactlyInstanceOf(AssertionInfo info, Object actual, Class<?> type) { if (!actualIsExactlyInstanceOfType(actual, type, info)) throw failures.failure(info, shouldBeExactlyInstance(actual, type)); }
/** * Verifies that the actual value is not exactly an instance of given type. * * @param info contains information about the assertion. * @param actual the given object. * @param type the type to check the actual value against. * @throws AssertionError if the actual is exactly an instance of given type. * @throws NullPointerException if the actual value is null. * @throws NullPointerException if the given object is null. */ public void assertIsNotExactlyInstanceOf(AssertionInfo info, Object actual, Class<?> type) { if (actualIsExactlyInstanceOfType(actual, type, info)) throw failures.failure(info, shouldNotBeExactlyInstance(actual, type)); }
/** * Verifies that the actual value is exactly a instance of given type. * * @param info contains information about the assertion. * @param actual the given object. * @param type the type to check the actual value against. * @throws AssertionError if the actual is not exactly a instance of given type. * @throws NullPointerException if the actual value is null. * @throws NullPointerException if the given object is null. */ public void assertIsExactlyInstanceOf(AssertionInfo info, Object actual, Class<?> type) { if (!actualIsExactlyInstanceOfType(actual, type, info)) throw failures.failure(info, shouldBeExactlyInstance(actual, type)); }
/** * Verifies that the actual value is not exactly a instance of given type. * * @param info contains information about the assertion. * @param actual the given object. * @param type the type to check the actual value against. * @throws AssertionError if the actual is exactly a instance of given type. * @throws NullPointerException if the actual value is null. * @throws NullPointerException if the given object is null. */ public void assertIsNotExactlyInstanceOf(AssertionInfo info, Object actual, Class<?> type) { if (actualIsExactlyInstanceOfType(actual, type, info)) throw failures.failure(info, shouldNotBeExactlyInstance(actual, type)); }