public void ShouldBeAValidItem() { //Arrange var item = FakerItem.GetSample(); //Act var itemTest = item.IsValid(); //Assert itemTest.Should().BeTrue(); }
public void ShouldBeSuccessToAddItem() { //Arrange var order = FakerOrder.GetSample(); var item = FakerItem.GetSample(); //Act order.AddItem(item); var orderTest = order.IsValid(); //Assert orderTest.Should().BeTrue(); order.Items.Should().HaveCount(1); }
public void ShouldInvalidToAddItemWithOrderNoPending(EOrderStatus status) { //Arrange var order = FakerOrder.GetSampleWithStatusEqualsTo(status); var countItems = order.Items.Count(); var item = FakerItem.GetSample(); //Act order.AddItem(item); var orderTest = order.IsValid(); //Assert orderTest.Should().BeFalse(); order.Items.Should().HaveCount(countItems); }