Search in sources :

Example 1 with DoubleColumn

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

the class ValueBinderTest method visit_DoubleColumnWithNullValueAcceptCalled_ShouldCallSetToNull.

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

Example 2 with DoubleColumn

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

the class ValueBinderTest method visit_DoubleColumnAcceptCalled_ShouldCallSetDouble.

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

Aggregations

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