mtedone / podam

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

CharSequence are not instanciated by default PodamFactory #310

Closed marcelmaatkamp closed 2 years ago

marcelmaatkamp commented 2 years 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

marcelmaatkamp commented 2 years ago

I have made a pull-request #309 which implements CharSequenceTypeManufacturerImpl and a test-case.

daivanov commented 2 years ago

Hi,

CharSequence is an interface implemented by String and we already have StringTypeManufacturerImpl, which is able to produce objects of desired types.

In the pull requests you test getClassInfo(), but not actual manufacturing.

Thanks, Daniil

daivanov commented 2 years ago

Fixed in7.2.11-RELEASE or later