public void CanCorrectlyMapComponentMaster() { var itemRevControl = new ItemRevControl(1); Session.Save(itemRevControl); var itemKey = new ItemRevKey(itemRevControl, 100); new PersistenceSpecification<Component>(Session) .CheckProperty(c => c.ItemRevKey, itemKey) .CheckProperty(c => c.Name, "My Name") .VerifyTheMappings(new Component(itemKey, "My Name")); }
public void CanCorrectlyMapComponentWithDetails() { var itemRevControl = new ItemRevControl(1); Session.Save(itemRevControl); var itemKey = new ItemRevKey(itemRevControl, 100); new PersistenceSpecification<ComponentWithDetails>(Session) .CheckProperty(c => c.ItemRevKey, itemKey) .CheckProperty(c => c.Name, "My Name") .CheckProperty(c => c.Category, "My Category") .CheckProperty(c => c.Cost, 1999.95) .CheckProperty(c => c.IsCertified, true) .VerifyTheMappings(new ComponentWithDetails(itemKey, "My Name")); }
public ComponentWithDetails(ItemRevKey itemRevKey, string name) : base(itemRevKey, name) { }