예제 #1
0
        public void ensureTableEntryIsntEqualToInstanceOfOtherType()
        {
            FinishPriceTableEntry instance = new FinishPriceTableEntry(materialEID: "hi", price: Price.valueOf(10),
                                                                       timePeriod: createTimePeriod(), finish: createFinish());

            Assert.False(instance.Equals("bananas"));
        }
예제 #2
0
        public void ensureTableEntryIsEqualToItself()
        {
            FinishPriceTableEntry instance = new FinishPriceTableEntry(materialEID: "hi", price: Price.valueOf(10),
                                                                       timePeriod: createTimePeriod(), finish: createFinish());

            Assert.True(instance.Equals(instance));
        }
예제 #3
0
        public void ensureTableEntriesWithEqualPropertiesAreEqual()
        {
            FinishPriceTableEntry instance = new FinishPriceTableEntry(materialEID: "hi", price: Price.valueOf(10),
                                                                       timePeriod: createTimePeriod(), finish: createFinish());
            FinishPriceTableEntry other = new FinishPriceTableEntry(materialEID: "hi", price: Price.valueOf(10),
                                                                    timePeriod: createTimePeriod(), finish: createFinish());

            Assert.True(instance.Equals(other));
        }
예제 #4
0
        public void ensureTableEntriesWithDifferentFinishesArentEqual()
        {
            FinishPriceTableEntry instance = new FinishPriceTableEntry(materialEID: "hi", price: Price.valueOf(10),
                                                                       timePeriod: createTimePeriod(), finish: createFinish());
            FinishPriceTableEntry other = new FinishPriceTableEntry(materialEID: "hi", price: Price.valueOf(10),
                                                                    timePeriod: createTimePeriod(), finish: createOtherFinish());

            Assert.False(instance.Equals(other));
        }