Search in sources :

Example 6 with AbstractWireOperations

use of org.firebirdsql.gds.ng.wire.AbstractWireOperations in project jaybird by FirebirdSQL.

the class TestV10WireOperations method testProcessResponse_warning.

/**
 * Test if processResponse does not throw an exception if the response
 * contains an exception that is warning.
 */
@Test
public void testProcessResponse_warning() throws Exception {
    AbstractWireOperations wire = createDummyWireOperations();
    SQLException exception = new FbExceptionBuilder().warning(ISCConstants.isc_numeric_out_of_range).toSQLException();
    GenericResponse genericResponse = new GenericResponse(-1, -1, null, exception);
    wire.processResponse(genericResponse);
}
Also used : AbstractWireOperations(org.firebirdsql.gds.ng.wire.AbstractWireOperations) SQLException(java.sql.SQLException) GenericResponse(org.firebirdsql.gds.ng.wire.GenericResponse) FbExceptionBuilder(org.firebirdsql.gds.ng.FbExceptionBuilder) Test(org.junit.Test)

Aggregations

AbstractWireOperations (org.firebirdsql.gds.ng.wire.AbstractWireOperations)6 GenericResponse (org.firebirdsql.gds.ng.wire.GenericResponse)6 Test (org.junit.Test)6 FbExceptionBuilder (org.firebirdsql.gds.ng.FbExceptionBuilder)4 SQLException (java.sql.SQLException)3 SQLWarning (java.sql.SQLWarning)3