Integration Test - Data on demand issue with 2 attributes of same type
I'm trying to generate an Integration test for my object where I have 2 attributes of same custom data type CurrencyAmount, I get the following errors when I try to do anything on my entity, it fails to add any new field or generate Integration tests for this entity
~.domain.ccti.CreditTransferTxnInfo roo> field string --fieldName testField
Cannot present nested annotations unless created by this classObject of class [org.springframework.roo.classpath.details.annotati ons.DefaultAnnotationMetadata] must be an instance of class org.springframework.roo.classpath.javaparser.detai ls.JavaParserAnnotationMetadataBuilder
~.domain.ccti.CreditTransferTxnInfo roo> field string --fieldName testField
Cannot present nested annotations unless created by this classObject of class [org.springframework.roo.classpath.details.annotati ons.DefaultAnnotationMetadata] must be an instance of class org.springframework.roo.classpath.javaparser.detai ls.JavaParserAnnotationMetadataBuilder
~.domain.ccti.CreditTransferTxnInfo roo> test integration
Created SRC_TEST_JAVA\com\acps\app\payments\core\domain\cc ti\CreditTransferTxnInfoDataOnDemand.java
Created SRC_TEST_JAVA\com\acps\app\payments\core\domain\cc ti\CreditTransferTxnInfoIntegrationTest.java
Undo create SRC_TEST_JAVA\com\acps\app\payments\core\domain\cc ti\CreditTransferTxnInfoIntegrationTest.java
Undo create SRC_TEST_JAVA\com\acps\app\payments\core\domain\cc ti\CreditTransferTxnInfoDataOnDemand.java
java.lang.IllegalArgumentException: Method 'setAmount' already defined in ITD (ITD target 'com.acps.app.payments.core.domain.ccti.CreditTran sferTxnInfoDataOnDemand_Roo_DataOnDemand'
~.domain.ccti.CreditTransferTxnInfo roo>
My Class is as follows
import com.acps.app.payments.core.domain.embed.CurrencyAm ount;
@RooJavaBean
@RooToString
@RooJpaEntity
public class CreditTransferTxnInfo {
Do I have to remove Roo due to its limitation on how it generates integration tests? Can someone advice if this is a roo limitation or something wrong in my usage of Roo?
complete project source is attached to re-create the issue
roo> Updated SRC_MAIN_JAVA\com\acps\app\payments\core\domain\cc ti\CreditTransferTxnInfo_Roo_ToString.aj
Updated SRC_MAIN_JAVA\com\acps\app\payments\core\domain\cc ti\CreditTransferTxnInfo_Roo_JavaBean.aj
Method 'setAmount' already defined in ITD (ITD target 'com.acps.app.payments.core.domain.ccti.CreditTran sferTxnInfoDataOnDemand_Roo_DataOnDemand'
Tried to delete and re-create the entity with roo entity command using -testAutomatically, so how adding the new Amount field results in an ITD error since the DataOnDemand is failing
I could not attach the entire Project even from the Roo backup command as it was 271Kb size and the limitation on this forum is 97kb so I have attached all the Java sources and dropped the webapp since this is a problem with Java entity and integration test you should be able to re create the issue
Thanks for your help, Please let me know at your earliest convenience since I'm stuck at the moment with this limitation