示例#1
0
        public void MinOrValue_SameValueAgeAndName_ReturnsSameValue()
        {
            var sameValueComparable = new TestComparable()
            {
                Name = "B",
                Age  = 2
            };

            IGenericValueComparer <TestComparable> stringValueComparer = CreateTestComparableComparer();

            TestComparable returnValue = stringValueComparer.MinOrValue(sameValueComparable);

            Assert.AreEqual(returnValue, sameValueComparable);
        }
示例#2
0
        public void MinOrValue_HigerValueAge_ReturnsSameValue()
        {
            var higherValueAge = new TestComparable()
            {
                Name = "B",
                Age  = 3
            };

            IGenericValueComparer <TestComparable> stringValueComparer = CreateTestComparableComparer();

            TestComparable returnValue = stringValueComparer.MinOrValue(higherValueAge);

            Assert.AreEqual(returnValue, higherValueAge);
        }
示例#3
0
        public void MinOrValue_LowerValueAge_ReturnsMinTestComparable()
        {
            var lowerValueAgeComparable = new TestComparable()
            {
                Name = "B",
                Age  = 1
            };

            IGenericValueComparer <TestComparable> stringValueComparer = CreateTestComparableComparer();

            TestComparable returnValue = stringValueComparer.MinOrValue(lowerValueAgeComparable);

            Assert.AreEqual(returnValue, MinTestComparableValue);
        }