English 中文(简体)
如何测试NHibernate apps:4个特定项目用于测试
原标题:How to test NHibernate apps: four specific items to test
  • 时间:2010-10-08 19:37:00
  •  标签:
  • nhibernate
问题回答

我尝试并给你简短的回答,特别是考虑到你已经出色地担任了提及职务。 他实际上没有显示博客物体的代码、相当于博客表格的数据库或该员额的制图,但是,他们都需要有工作榜样。

a) 绘制地图要正确,这意味着NHib知道如何将Blog物体翻译成Blog表格,并再次回去。 由于他的单位测试一直停留在博客条目上,然后从数据库中装载,你可以认为,必须正确绘制有关所有财产的地图。

b) 这确实涉及制图的完整性。 例如,他使用博客标语的所有权财产,因此,需要坚持的其他财产是其单位测试的一部分。 推定他的单位测试包括一整套需要坚持的博客特性。

c) 这是指相关表格的顺序。 例如,如果你想要的话和博客的话。 在保留Blog入境时,评论表将自动坚持,对此应进行单位测试,或许可以证明,在Blog储蓄之后,你可以检索评论(Ayende没有显示这一员额的测试)。

d) Ayende don t 显示该职位上的询问测试,但如果他有利用案件来收回在规定日期范围内产生的博客,他可能会在一周内用博客条目进行测试,然后证明他只能选择特定日期产生的博客。

这似乎像一个比较复杂的专题(而且现在!) ,但把我论调出的唯一途径是获得你的双手 d。

HTH,
Berryl





相关问题
nHibernate one-to-many inserts but doesnt update

Instead of getting into code, I have a simple question. Default behavior for a simple one-to-many is that it inserts the child record then updates the foreign key column with the parent key. Has ...

How Do I copy an existing nhibernate object as a new object?

I a persisted NHibernate object that I would like to repersist as a new entity. How do I get NHibernate to save this object as if it was a new? I am thinking I might create a session interceptor to ...

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

NHibernate Search in a List using ICriteria

I have my class X : public class ClassX { public virtual IList<ClassY> ListY { get; set; } ... } My ClassX mapping (using Fluent) ... HasMany<ClassX>(x => x.ListY ) ....

热门标签