podam icon indicating copy to clipboard operation
podam copied to clipboard

Separate Annotations and Implementation into separate jars

Open mnd999 opened this issue 11 years ago • 7 comments

It would be nice to be able to have only the annotations on the production classpath, importing the actual implementation logic on the test classpath only.

mnd999 avatar Feb 26 '15 12:02 mnd999

I'm thinking of removing annotations altogether:-) With custom strategies there's no need. Besides it was an architectural mistake asking users to annotate their production code with a testing framework

On Thursday, February 26, 2015, mnd999 [email protected] wrote:

It would be nice to be able to have only the annotations on the production classpath, importing the actual implementation logic on the test classpath only.

— Reply to this email directly or view it on GitHub https://github.com/mtedone/podam/issues/79.

mtedone avatar Feb 26 '15 14:02 mtedone

Yeah, i think that might be a better solution, see #80

mnd999 avatar Feb 26 '15 15:02 mnd999

If that's about PodamExclude annotation, PODAM allows usage of any custom annotations as exclusion annotations. See this test https://github.com/mtedone/podam/blob/master/src/test/java/uk/co/jemos/podam/test/unit/BooleanUnitTest.java

daivanov avatar Feb 26 '15 16:02 daivanov

Daniil I was suggesting to remove all podam annotations

On Thursday, February 26, 2015, Daniil Ivanov [email protected] wrote:

If that's about PodamExclude annotation, PODAM allows usage of any custom annotations as exclusion annotations. See this test

https://github.com/mtedone/podam/blob/master/src/test/java/uk/co/jemos/podam/test/unit/BooleanUnitTest.java

— Reply to this email directly or view it on GitHub https://github.com/mtedone/podam/issues/79#issuecomment-76214004.

mtedone avatar Feb 27 '15 01:02 mtedone

PODAm has quite a few annotations:

  • PodamLongValue, PodamBooleanValue, PodamDoubleValue, PodamShortValue, PodamByteValue, PodamCharValue, PodamFloatValue, PodamStringValue, PodamIntValue - can be done through DataProviderStrategy.
  • PodamCollection - can be done with DataProviderStrategy
  • PodamConstructor - can be done with DataProviderStrategy by manipulating constructor sorting
  • PodamExclude - cannot be done with DataProviderStrategy
  • PodamStrategyValue - this is very crucial annotation, which is the only conduit for some POJO production and has no replacement

daivanov avatar Feb 27 '15 08:02 daivanov

Thank you Daniil. I’ve always built POJOs through Podam without ever annotating my production code. I must assume that the “cannot be done / crucial” annotations are used within Podam itself?

On 27 Feb 2015, at 08:57, Daniil Ivanov [email protected] wrote:

PODAm has quite a free annotations:

PodamLongValue, PodamBooleanValue, PodamDoubleValue, PodamShortValue, PodamByteValue, PodamCharValue, PodamFloatValue, PodamStringValue, PodamIntValue - can be done through DataProviderStrategy. PodamCollection - can be done with DataProviderStrategy PodamConstructor - can be done with DataProviderStrategy by manipulating constructor sorting PodamExclude - cannot be done with DataProviderStrategy PodamStrategyValue - this is very crucial annotation, which is the only conduit for some POJO production and has no replacement — Reply to this email directly or view it on GitHub https://github.com/mtedone/podam/issues/79#issuecomment-76358488.

mtedone avatar Feb 27 '15 10:02 mtedone

Fixed in 5.2.0.RELEASE. You can now specify your production annotations and Podam will exclude fields annotated with it while filling the POJO

mtedone avatar Mar 29 '15 11:03 mtedone