public void ShouldBe(OrderLine other) { Id.ShouldBe(other.Id); OrderId.ShouldBe(other.OrderId); Quantity.ShouldBe(other.Quantity); SellPrice.ShouldBe(other.SellPrice); }
public void Delete_GivenPoco_ShouldDeletePoco() { // Arrange DB.Insert(_person); _order.PersonId = _person.Id; DB.Insert(_order); _orderLine.OrderId = _order.Id; DB.Insert(_orderLine); DB.Insert(_note); // Act DB.Delete(_orderLine); DB.Delete(_order); DB.Delete(_person); DB.Delete(_note); _person = DB.SingleOrDefault<Person>(_person.Id); _order = DB.SingleOrDefault<Order>(_order.Id); _orderLine = DB.SingleOrDefault<OrderLine>(_orderLine.Id); _note = DB.SingleOrDefault<Note>(_note.Id); // Assert _person.ShouldBeNull(); _order.ShouldBeNull(); _orderLine.ShouldBeNull(); _note.ShouldBeNull(); }
public void ShouldNotBe(OrderLine other, bool sameIds) { if (sameIds) { Id.ShouldBe(other.Id); OrderId.ShouldBe(other.OrderId); } else { Id.ShouldNotBe(other.Id); OrderId.ShouldNotBe(other.OrderId); } Quantity.ShouldNotBe(other.Quantity); SellPrice.ShouldNotBe(other.SellPrice); }
private static void UpdateProperties(OrderLine orderLine) { orderLine.Quantity = 6; orderLine.SellPrice = 5.99m; orderLine.Status = OrderLineStatus.Allocated; }
private static void UpdateProperties(OrderLine orderLine) { orderLine.Quantity = 6; orderLine.SellPrice = 5.99m; }