Hi,
Taking my first steps in Roo, great project by any means I can think, I have some unexpected behaviour when creating integration test when using composition in my entities.
I“ve two entities, the have a composition relantionship created using the add field reference jpa command.
When I create integration test for them using Roo the ProductoIntegrationTest fails due to integrity constraint violation in testRemove.Code:@Entity @RooEntity @RooJavaBean @RooToString @RooPlural("Entradas") public class Entrada { @NotNull private Double cantidad; @NotNull @ManyToOne @JoinColumn private Producto producto; } @Entity @RooEntity @RooJavaBean @RooToString @RooPlural("Productos") public class Producto { ... }
It“s easy to manually fix this, either modifiying the remove method or the testRemove method, but I think it should be a way to customize the test“s behaviour in this context because I believe a integrity constraint violation exception could be the expected behaviour when trying to delete a Product in some use cases. Or in general is usefull to test that some expected errors or exceptions occur.
What do you people think??
Best Regards, Raśl


Reply With Quote
.
