podam icon indicating copy to clipboard operation
podam copied to clipboard

Unsupported features

Open luckyQing opened this issue 7 years ago • 11 comments

  1. Unsupported BigInteger、BigDecimal. etc PodamFactory factory = new PodamFactoryImpl(); BigInteger bigInteger = factory.manufacturePojoWithFullData(BigInteger.class);

  2. Nested generics are not supported. etc List<BasePageResp>

luckyQing avatar May 09 '19 12:05 luckyQing

Hi,

  1. manufacturePojoWithFullData is rather dangerous method as it tries to do it with constructor with the maximum parameters. Use manufacturePojo() instead or make custom TypeManufacturer for BigDecimal.
  2. List - there is no nested generics here. Could you please clarify what do you mean?

Thanks, Daniil

daivanov avatar May 09 '19 13:05 daivanov

For example, I want to mock an object, Req<BasePageReq<App<List<String>>>>, it will show me an error.

luckyQing avatar May 09 '19 13:05 luckyQing

I want to have the following features: `PodamFactory factory = new PodamFactoryImpl();

TypeReference typeReference = new TypeReference<Req<BasePageReq<App<List>>>>() { }; Req<BasePageReq<App<List>>> data2 = factory.manufacturePojoWithFullData(typeReference);`

luckyQing avatar May 09 '19 13:05 luckyQing

In addition, if the value of the annotation like PodamStringValue can support one randomly from array, it feels better. For example, @PodamStringValue(value={"male", "female"})

luckyQing avatar May 09 '19 13:05 luckyQing

it will show me an error

What kind of error?

Thanks, Daniil

daivanov avatar May 09 '19 13:05 daivanov

Use custom TypeManufacturer instead of @PodamStringValue. People really avoid them, because it forces to add podam as dependency instead of test dependency.

daivanov avatar May 09 '19 13:05 daivanov

Customizing TypeManufacturer is inconvenient. And it is more convenient to use annotations

luckyQing avatar May 09 '19 13:05 luckyQing

It does not support this generic object, etc Req<BasePageReq<App<List>>>

luckyQing avatar May 09 '19 13:05 luckyQing

Customizing TypeManufacturer is inconvenient. And it is more convenient to use annotations

You seems to be alone with that opinion so far.

It does not support this generic object, etc Req<BasePageReq<App<List>>>

I need either code to reproduce the issue or at least Podam's log.

Thanks, Daniil

daivanov avatar May 13 '19 20:05 daivanov

I have implemented the functionality I need based on your suggestions and can support multiple levels of nested generics. E.g:Req<BasePageReq<App<List<String>>>>.Thank you.

luckyQing avatar May 14 '19 03:05 luckyQing

Ok, not sure what was the problem, but it is great that you have fixed it.

Thanks, Daniil

daivanov avatar May 14 '19 15:05 daivanov