The Northwind data is certainly lacking many useful things. I did add a few
rows for my linq null tests. There are already other non-northwind entities
there (like animals). While I don't know how the DomainModel makes itself,
I found the Linq one a bit odd... there seemed to be entity code to generate
the DB, but it was all unused. What was used was a pre-generated sql
script. I ended up adding my extra info in both places just in case. I'm
certainly up for some improvements in the area of Linq testing. In general,
it doesn't make oodles of sense to have two full domain models, so perhaps
instead of extending Northwind much further, we could have another Linq test
type that utilizes the domain model as well. I don't see a big problem with
having two test types, since it would prevent rewriting the existing linq
tests and would also prevent having to port lots of scenarios from the
domain model. So my vote is for two base classes.
Patrick Earl
On Thu, Dec 2, 2010 at 8:03 AM, Julian Maughan <[email protected]>wrote:
> I was just reviewing the tests in the NHibernate.Tests.Linq namespace.
> Actually I wanted to add a couple of tests related to NH-2416, but I
> found that the Northwind domain model that the Linq tests use is
> really rather basic. I couldn't find a Dictionary mapping, or even an
> existing collection mapping that would make sense as a Dictionary
> mapping, except by adding new entities of my own. Is the intention to
> keep the Northwind domain model unchanged, or was it just used as a
> starting point?
>
> I could add my tests to the Linq namespace as a new fixture that
> inherits from TestCase, but this would seem to break the current
> convention of Linq tests inheriting from LinqTestCase.
>
> The domain model in NHibernate.DomainModel is much richer/complex and
> more appropriate for testing trickier issues, so wouldn't this have
> been a better choice?
>
> Also, I don't want to put all Linq tests into the NHSpecificTest
> namespace if they test common use-cases. IMO NHSpecificTests should be
> reserved mainly for unusual edge-case scenarios.
>