Beispiel #1
0
        public void GetClonedBillItem()
        {
            // Arrange
            BillItem billItem = ModelFactory.GetDefaultBillItem();

            // Act
            BillItem copiedBillItem = (BillItem)billItem.Clone();

            // Assert
            billItem.Equals(copiedBillItem).Should().BeTrue();
        }
Beispiel #2
0
        public void BillItemsUnequalIfOtherBillItemIsNull()
        {
            // Arrange
            BillItem billItem = ModelFactory.GetDefaultBillItem();

            // Act
            bool isEqual = billItem.Equals(null);

            // Assert
            isEqual.Should().BeFalse();
        }
Beispiel #3
0
        public void BillItemsEqualIfBothBillItemsHaveSameValues()
        {
            // Arrange
            BillItem billDetail1 = ModelFactory.GetDefaultBillItem();
            BillItem billDetail2 = ModelFactory.GetDefaultBillItem();

            // Act
            bool isEqual = billDetail1.Equals(billDetail2);

            // Assert
            isEqual.Should().BeTrue();
        }
Beispiel #4
0
        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();
        }