May 12th, 2011, 12:03 PM
Trouble with Integration Tests for concrete subtypes of abstract types
I'm new to Spring Roo and very impressed of whats all possible with it.
But i've a problem with the creation of Integration Tests.
If i create an AbstractType and an concrete Subtype of it, for which I use --testAutomatically, Roo generates erroneous java-code.
Simply this problem can be produced with the following roo-commands:
(I've run them in the Sprint Source Tool Suite)
// Spring Roo 1.1.3.RELEASE [rev 4404ffb] log opened at 2011-05-12 18:59:28
project --topLevelPackage test --projectName RooTest --java 6
persistence setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE
entity --class ~.AbstractType --abstract
entity --class ~.ConcreteType --extends test.AbstractType --testAutomatically
Roo creates a wrong "ConcreteClassDataOnDemand_Roo_DataOnDemand",
where it uses the AbstractType instead of the ConcreteType, so that there are
some java errors that prevent from running it.
Chaning the occurences of AbstractType with ConcreteType will fix the problem and the test passes but due it's generated code, roo will overwrite it at any changes...
Is this a real bug of roo, or does anyone has a solution for this?
Tags for this Thread