Search in sources :

Example 1 with FBRowId

use of org.firebirdsql.jdbc.FBRowId in project jaybird by FirebirdSQL.

the class TestFBRowIdField method getObject_FBRowId_null.

@Test
public void getObject_FBRowId_null() throws SQLException {
    toReturnNullExpectations();
    FBRowId rowId = field.getObject(FBRowId.class);
    assertNull(rowId);
}
Also used : FBRowId(org.firebirdsql.jdbc.FBRowId) Test(org.junit.Test)

Example 2 with FBRowId

use of org.firebirdsql.jdbc.FBRowId in project jaybird by FirebirdSQL.

the class TestFBBinaryField method getObject_FBRowId_null.

@Test
public void getObject_FBRowId_null() throws SQLException {
    toReturnNullExpectations();
    FBRowId rowId = field.getObject(FBRowId.class);
    assertNull(rowId);
}
Also used : FBRowId(org.firebirdsql.jdbc.FBRowId) Test(org.junit.Test)

Example 3 with FBRowId

use of org.firebirdsql.jdbc.FBRowId in project jaybird by FirebirdSQL.

the class BaseJUnit4TestFBField method setRowIdNonNull.

@Test
public void setRowIdNonNull() throws SQLException {
    expectedException.expect(TypeConversionException.class);
    field.setRowId(new FBRowId(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }));
}
Also used : FBRowId(org.firebirdsql.jdbc.FBRowId) Test(org.junit.Test)

Example 4 with FBRowId

use of org.firebirdsql.jdbc.FBRowId in project jaybird by FirebirdSQL.

the class TestFBRowIdField method setObjectNonNull.

@Test
public void setObjectNonNull() throws SQLException {
    final byte[] bytes = getRandomBytes();
    setValueExpectations(bytes);
    field.setObject(new FBRowId(bytes));
}
Also used : FBRowId(org.firebirdsql.jdbc.FBRowId) Test(org.junit.Test)

Example 5 with FBRowId

use of org.firebirdsql.jdbc.FBRowId in project jaybird by FirebirdSQL.

the class TestFBRowIdField method setObject_RowId.

@Test
@Override
public void setObject_RowId() throws SQLException {
    final byte[] bytes = getRandomBytes();
    final RowId rowId = new FBRowId(bytes);
    setValueExpectations(bytes);
    field.setObject(rowId);
}
Also used : RowId(java.sql.RowId) FBRowId(org.firebirdsql.jdbc.FBRowId) FBRowId(org.firebirdsql.jdbc.FBRowId) Test(org.junit.Test)

Aggregations

FBRowId (org.firebirdsql.jdbc.FBRowId)11 Test (org.junit.Test)11 RowId (java.sql.RowId)4