public void Generic_Constructor_IEnumerable(EnumerableType enumerableType, int setLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements) { var enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, numberOfDuplicateElements); var stack = new SeqStack <T>(enumerable); Assert.Equal(enumerable.ToArray().Reverse(), stack.ToArray()); }
public void Generic_Constructor_int(int count) { var stack = new SeqStack <T>(count); Assert.Equal(new T[0], stack.ToArray()); }