Beispiel #1
0
        public void BothAreNull()
        {
            // Arrange
            var comparer = new CompareProcessedPeaksByValue <Peak>();

            // Act
            var result = comparer.Compare(null, null);

            // Assert
            Assert.True(result == 0);
        }
Beispiel #2
0
        public void YIsNull()
        {
            // Arrange
            var comparer = new CompareProcessedPeaksByValue <Peak>();
            var x        = GetP();

            // Act
            var result = comparer.Compare(x, null);

            // Assert
            Assert.True(result == 1);
        }
Beispiel #3
0
        public void XIsNull()
        {
            // Arrange
            var comparer = new CompareProcessedPeaksByValue <Peak>();
            var y        = GetP();

            // Act
            var result = comparer.Compare(null, y);

            // Assert
            Assert.True(result == -1);
        }
Beispiel #4
0
        public void EqualValueCompareByIntervalLeft(int xLeft, int yLeft, int expectedResult)
        {
            // Arrange
            var comparer = new CompareProcessedPeaksByValue <Peak>();
            var x        = GetP(left: xLeft);
            var y        = GetP(left: yLeft);

            // Act
            var result = comparer.Compare(x, y);

            // Assert
            Assert.True(result == expectedResult);
        }
Beispiel #5
0
        public void CompareByValue(int xValue, int yValue, int expectedResult)
        {
            // Arrange
            var comparer = new CompareProcessedPeaksByValue <Peak>();
            var x        = GetP(value: xValue);
            var y        = GetP(value: yValue);

            // Act
            var result = comparer.Compare(x, y);

            // Assert
            Assert.True(result == expectedResult);
        }