use of org.firebirdsql.encodings.EncodingDefinition in project jaybird by FirebirdSQL.
the class FieldDescriptorTest method shouldUseEncodingSpecificDatatypeCoder_stringType_notDefaultCharset.
@Test
public void shouldUseEncodingSpecificDatatypeCoder_stringType_notDefaultCharset() {
FieldDescriptor descriptor = createFieldDescriptor(ISCConstants.SQL_TEXT, CHARSET_ID_WIN1252, 0);
EncodingDefinition win1252EncodingDefinition = encodingFactory.getEncodingDefinitionByCharacterSetId(CHARSET_ID_WIN1252);
DatatypeCoder datatypeCoder = descriptor.getDatatypeCoder();
assertThat(datatypeCoder, instanceOf(EncodingSpecificDatatypeCoder.class));
assertEquals(win1252EncodingDefinition, datatypeCoder.getEncodingDefinition());
assertEquals(8, descriptor.getCharacterLength());
}
Aggregations