示例#1
0
        public void NormalTest()
        {
            Assert.True(ValidatePopSequence.IsSequence(new[] { 1, 2, 3, 4, 5 }, new[] { 4, 5, 3, 2, 1 }));
            Assert.True(ValidatePopSequence.IsSequence(new[] { 1, 2, 3, 4, 5 }, new[] { 5, 4, 3, 2, 1 }));

            Assert.False(ValidatePopSequence.IsSequence(new[] { 1, 2, 3, 4, 5 }, new[] { 4, 3, 5, 1, 2 }));
        }
示例#2
0
 public void ArraysWithDifferenceElements()
 {
     Assert.False(ValidatePopSequence.IsSequence(new[] { 1, 2, 3, 4, 5, 6 }, new[] { 4, 5, 7, 3, 2, 1 }));
 }
示例#3
0
 public void NullReference()
 {
     Assert.Throws <ArgumentNullException>(() => ValidatePopSequence.IsSequence(null, null));
 }