mtedone / podam

PODAM - POjo DAta Mocker
https://mtedone.github.io/podam
MIT License
323 stars 750 forks source link

java.lang.CharSequence is missing in uk.co.jemos.podam.typeManufacturers #309

Closed marcelmaatkamp closed 1 year ago

marcelmaatkamp commented 1 year ago

Apache Avro uses CharSequence for string-type attributes when (de-)serializing java pojo's. Testing these with Podam requires a 'CharSequenceTypeManufacturer' which is currently missing:

WARN u.c.jemos.podam.api.PodamFactoryImpl - Cannot instantiate a class interface java.lang.CharSequence. Resorting to uk.co.jemos.podam.api.NullExternalFactory external factory

I have implemented CharSequenceTypeManufacturer and a added a test-case. I also had to bump compiler.source to '7' in order to succesfully compile the code.

daivanov commented 1 year ago

Hi,

CharSequenceTypeManufacturerImpl does the same as StringTypeManufacturerImpl so this is not really needed. I merged the test and mapped CharSequence.class to StringTypeManufacturerImpl and this solves the issue.

Thanks, Daniil