public void GetClonedBillItem() { // Arrange BillItem billItem = ModelFactory.GetDefaultBillItem(); // Act BillItem copiedBillItem = (BillItem)billItem.Clone(); // Assert billItem.Equals(copiedBillItem).Should().BeTrue(); }
public void BillItemsUnequalIfOtherBillItemIsNull() { // Arrange BillItem billItem = ModelFactory.GetDefaultBillItem(); // Act bool isEqual = billItem.Equals(null); // Assert isEqual.Should().BeFalse(); }
public void BillItemsEqualIfBothBillItemsHaveSameValues() { // Arrange BillItem billDetail1 = ModelFactory.GetDefaultBillItem(); BillItem billDetail2 = ModelFactory.GetDefaultBillItem(); // Act bool isEqual = billDetail1.Equals(billDetail2); // Assert isEqual.Should().BeTrue(); }
public void BillItemsUnequalIfBillItemValuesDiffer() { // Arrange BillItem billDetail1 = ModelFactory.GetDefaultBillItem(); BillItem billDetail2 = ModelFactory.GetDefaultBillItem(); billDetail2.Discount = 3d; // Act bool isEqual = billDetail1.Equals(billDetail2); // Assert isEqual.Should().BeFalse(); }