Is it ok to call specifications from an aggregate factory for validation, or does that validation call belong in a unit test (DDD)?
I have created a factory and a set of specifications to create and validate an aggregate root.  Currently I have some tests for the factory that call the specifications on the product of the factory, but I'm wondering if that's enough.  It might be better from a design perspective to couple the factory to the specifications of it's product, since they are closely interrelated.


If a specification for an aggregate root product is being used for validation, rather than for creation, does it make sense to call it from inside the factory?

Or is a unit test good enough?
Is it ok to call specifications from an aggregate factory for validation, or does that validation call belong in a unit test (DDD)?
===

I have created a factory and a set of specifications to create and validate an aggregate root.  Currently I have some tests for the factory that call the specifications on the product of the factory, but I'm wondering if that's enough.  It might be better from a design perspective to couple the factory to the specifications of it's product, since they are closely interrelated.


If a specification for an aggregate root product is being used for validation, rather than for creation, does it make sense to call it from inside the factory?

Or is a unit test good enough?