I'm not sure I agree there.  I won't have any Asserts on a domain builder
class.  Only the domain classes.  



Kalle Korhonen-2 wrote:
> 
> I'd just put those tests in domain-builder module and call them
> integration tests. After all, they are testing the builder classes
> just as well as the domain classes.
> 
> Kalle
> 
> 
> On Fri, Oct 16, 2009 at 10:41 AM, leojhartiv <[email protected]> wrote:
>>
>> I have the following project hierarchy:
>>
>> parent
>> -pom.xml
>> -domain
>> --pom.xml
>> -domain-builder
>> --pom.xml
>>
>>
>> The domain project contains (surprise) all of my domain objects:
>>  Account
>>  Person
>>  User
>>  etc.
>>
>> The domain-builder project represents the "Test Data Builder Pattern"
>> (http://nat.truemesh.com/archives/000714.html) and contains things like:
>>
>> AccountBuilder
>> PersonBuilder
>> UserBuilder
>>
>> All of which depend on domain.
>>
>> We use the domain builders in order to simplify testing in some of our
>> higher layers.  We do not include it in any packaged production code.  So
>> essentially:
>>
>> domain-builder depends on domain (compile)
>> and
>> domain depends on nothing
>>
>> and domain-builder is used like:
>>
>> Account account = new
>> AccountBuilder().allDummiedUp().withName("Leo").build
>>
>> One of our developers asked me if it would be possible to use the
>> domain-builder packages in unit tests for domain in order to avoid having
>> to
>> create test data via the .allDummiedUp methods.  I can kinda see the
>> value
>> there, so I said I'd look into it.  Unfortunately it seems to introduce a
>> circular dependency:
>>
>> domain-builder depends on domain (compile)
>> and
>> domain depends on domain-builder (test)
>>
>> One solution might be to include the packages from domain-builder in the
>> domain project, but I don't want to package those classes in the final
>> domain JAR.
>>
>> Has anyone else worked on this issue?  What would you recommend?
>>
>> Thanks!
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Advice-on-Resolving-Maven-Circular-Dependency-tp25929510p25929510.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Advice-on-Resolving-Maven-Circular-Dependency-tp25929510p25946812.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to