Пример #1
0
        public void Compare_ReturnsNegative_IfSecondArguementIsSmaller()
        {
            PriceComparerDescendingZeroFirst comparer = new PriceComparerDescendingZeroFirst();
            Price p1     = new Price(2);
            Price p2     = new Price(1);
            int   result = comparer.Compare(p1, p2);

            Assert.True(result < 0, "Result should be less than 0");
        }
Пример #2
0
        public void Compare_ReturnsPositive_IfSecondArguementIs0()
        {
            PriceComparerDescendingZeroFirst comparer = new PriceComparerDescendingZeroFirst();
            Price p1     = new Price(1);
            Price p2     = new Price(0);
            int   result = comparer.Compare(p1, p2);

            Assert.True(result > 0, "Result should be greater than 0");
        }
Пример #3
0
        public void Compare_Returns0_IfBothArguementAre0()
        {
            PriceComparerDescendingZeroFirst comparer = new PriceComparerDescendingZeroFirst();
            Price p1     = new Price(0);
            Price p2     = new Price(0);
            int   result = comparer.Compare(p1, p2);

            Assert.True(result == 0, "Result should be greater than 0");
        }
 public void PriceComparerDescendingZeroFirstGreaterThan()
 {
     _priceComparerDescendingZeroFirst.Compare(2, 1);
 }