Search in sources :

Example 1 with BooleanColumn

use of com.scalar.db.io.BooleanColumn in project scalardb by scalar-labs.

the class ValueBinderTest method visit_BooleanColumnAcceptCalled_ShouldCallSetBool.

@Test
public void visit_BooleanColumnAcceptCalled_ShouldCallSetBool() {
    // Arrange
    BooleanColumn column = BooleanColumn.of(ANY_NAME, ANY_BOOL);
    ValueBinder binder = new ValueBinder(bound);
    // Act
    column.accept(binder);
    // Assert
    verify(bound).setBool(0, ANY_BOOL);
}
Also used : BooleanColumn(com.scalar.db.io.BooleanColumn) Test(org.junit.jupiter.api.Test)

Example 2 with BooleanColumn

use of com.scalar.db.io.BooleanColumn in project scalardb by scalar-labs.

the class ValueBinderTest method visit_BooleanColumnWithNullValueAcceptCalled_ShouldCallSetToNull.

@Test
public void visit_BooleanColumnWithNullValueAcceptCalled_ShouldCallSetToNull() {
    // Arrange
    BooleanColumn column = BooleanColumn.ofNull(ANY_NAME);
    ValueBinder binder = new ValueBinder(bound);
    // Act
    column.accept(binder);
    // Assert
    verify(bound).setToNull(0);
}
Also used : BooleanColumn(com.scalar.db.io.BooleanColumn) Test(org.junit.jupiter.api.Test)

Aggregations

BooleanColumn (com.scalar.db.io.BooleanColumn)2 Test (org.junit.jupiter.api.Test)2