Exemplo n.º 1
0
        public void CanPeekOrElseEmpty_PeekOrElse_Test()
        {
            //  Arrange
            var stack     = new CheckedLayeredStack <string>();
            var arbitrary = "foobar";
            //  Act
            var x = stack.PeekOrElse(orElse: arbitrary);
            var y = stack.PeekItemOrElse(0, orElse: arbitrary);

            //  Assert
            Assert.Equal(arbitrary, x);
            Assert.Equal(arbitrary, y);
        }