public void GetProduct_WhenExists_ReturnsThatProduct() { var expected = new Product {Id = 3, Name = "Bread", UnitPrice = 1.00m}; var actual = repo.GetProduct(3); Assert.That(actual, Is.EqualTo(expected)); }
/// <summary> /// 保存实体信息 /// </summary> /// <param name="pEntity">实体对象</param> /// <returns>是否成功</returns> public void Save(Product pEntity) { HibernateDaoHelp.SaveOrUpdate(pEntity); }