Search in sources :

Example 1 with DefaultUdtValue

use of com.datastax.oss.driver.internal.core.data.DefaultUdtValue in project java-driver by datastax.

the class UdtCodecTest method should_accept_object.

@Test
public void should_accept_object() {
    assertThat(codec.accepts(userType.newValue())).isTrue();
    // covariance allowed
    assertThat(codec.accepts(new DefaultUdtValue(userType))).isTrue();
    assertThat(codec.accepts("not a udt")).isFalse();
}
Also used : DefaultUdtValue(com.datastax.oss.driver.internal.core.data.DefaultUdtValue) Test(org.junit.Test)

Aggregations

DefaultUdtValue (com.datastax.oss.driver.internal.core.data.DefaultUdtValue)1 Test (org.junit.Test)1