示例#1
0
        public void Clear_WhenCalled_ShouldClearStack(int range)
        {
            // Arrange
            for (var i = 1; i <= range; i++)
            {
                _stack.Push(i);
            }

            // Act
            _stack.Clear();

            // Assert
            Assert.That(_stack.IsEmpty, Is.EqualTo(true));
            Assert.That(_stack.Size, Is.EqualTo(0));
        }