This project is read-only.

Factories and Sessions

Reflection (how AutoPoco works) is a slow process, so the bulk of this has been shifted to the configuration portion of AutoPoco usage
  • Building a factory is an expensive operation
  • Creating a session is a cheap operation

However, data sources have a memory - so they can product verifiable/repeatable data (for example, a NumericalIdDataSource might start at 1 and go to N), so for every session created, new data sources are created for that session
  • Factories are therefore immutable
  • Sessions generate repeatable data (providing the data-sources are written properly)

That's pretty much all there is to it, all the set up can be done once, and then each test can be given a new session to get its test data from

Last edited Apr 8, 2010 at 12:57 AM by robashton, version 2


No comments yet.