Examples of ResultVerifier


Examples of org.h2.test.utils.ResultVerifier

     * @param expectedExceptionClass the expected exception class to be thrown
     * @param obj the object to wrap
     * @return a proxy for the object
     */
    protected <T> T assertThrows(final Class<?> expectedExceptionClass, final T obj) {
        return assertThrows(new ResultVerifier() {
            public boolean verify(Object returnValue, Throwable t, Method m, Object... args) {
                if (t == null) {
                    throw new AssertionError("Expected an exception of type " +
                            expectedExceptionClass.getSimpleName() +
                            " to be thrown, but the method returned " +
View Full Code Here

Examples of org.h2.test.utils.ResultVerifier

     * @param expectedErrorCode the expected error code
     * @param obj the object to wrap
     * @return a proxy for the object
     */
    protected <T> T assertThrows(final int expectedErrorCode, final T obj) {
        return assertThrows(new ResultVerifier() {
            public boolean verify(Object returnValue, Throwable t, Method m, Object... args) {
                int errorCode;
                if (t instanceof DbException) {
                    errorCode = ((DbException) t).getErrorCode();
                } else if (t instanceof SQLException) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.