我有一个课程如下。这是单独测试的候选者吗?我可以为这堂课写什么样的考试/报道?
public class Cart : ICart
{
public int Id { get; set; }
public ABCCompany Company { get; set; }
public decimal Subtotal { get; set; }
public decimal DiscountValue { get; set; }
public decimal DiscountedSubtotal{ get; set; }
public ICartDiscounts Discounts { get; set; }
public IList<ICartItem> Items { get; set; }
}
没有逻辑可以测试......不;它不是真正的单元可测试的。
人们可以争辩说,吸气剂和制定者可以进行测试;但这样做确实没有意义,因为逻辑是提供的框架。