Frans, On Tue, Aug 17, 2010 at 03:58, Frans Bouma <[email protected]> wrote:
> > OK, let me explain what I mean by "the mappings are OK": > > - They are considered valid by NHibernate (this is a single test) > > You and I know that that's just not going to be a valid test. You > can have xml mappings which load fine in the factory but barf when you save > an entity, query an entity etc. > That's not what I'm testing there. I do have some specific tests for that, which are based on the real use cases. > > - I can query every mapped entity, verify it loads, and check for ghosts > (I > > automatically generate a test method for each entity) > > a single one? So, if you have an entity with 3 relationships, you > generate 1 test to be sure the mappings are OK? > > 1) it's not enough, you could have missed a directive in the > mappings for the relationships, e.g. it might generate a 1:n query while > you > needed a 1:1 query > And nobody will do that for me. That's part of the business logic. > 2) it's doing work that's unnecessary, as you're testing work which > can be done by a machine which doesn't make mistakes. > Did you read the part where I say this is autogenerated? > > > How would FNH help me here? > > it at least makes sure names etc. match. > That's what the first test is for. > > ...Except FNH does not have a "validation pipeline". It relies on NH's > XML > > input. > > pipeline == code generation engine. So the same input always > generates the same XML. This is a good thing because you then just have to > focus on the input. > I've said it 100 times in this thred: what's the value in a 1-1 "generation"??????????? I don't need a C# -> XML "generator", I can write XML myself. > > It's just a different syntax and different names for the exact same > concepts > > I map using XML (only it's incomplete). > > For the record, I'm *not* talking about automapping, which DOES add > value. > > auto-mapping... ah, isn't that the mechanism which is used by > people > who are so against db-first, but at the same time are doing just that? > > WHAT? 8-O Automapping is model-first runtime code generation. Diego -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
