Peek() public méthode

Peeks at the routing key this message would use to route. Call Pop to both Peek and Remove the key before sending.
public Peek ( ) : int?
Résultat int?
        public static void Test_Event_Message_Routing_Stack_Has_Pushed_Values()
        {
            //arrange
            Mock<PacketPayload> packet = new Mock<PacketPayload>(MockBehavior.Strict);
            RequestMessage message = new RequestMessage(packet.Object);

            //act
            message.Push(5);
            message.Push(4);
            message.Push(3);

            //assert
            Assert.NotNull(message.Peek());
            Assert.True(message.isMessageRoutable);

            Assert.AreEqual(3, message.Pop());
            Assert.AreEqual(4, message.Pop());
            Assert.AreEqual(5, message.Pop());

            Assert.IsNull(message.Peek());
            Assert.IsFalse(message.isMessageRoutable); //shouldn't be able to rout
        }
        public static void Test_Event_Message_Routing_Stack_Empty_On_Initial_Creation()
        {
            //arrange
            Mock<PacketPayload> packet = new Mock<PacketPayload>(MockBehavior.Strict);
            RequestMessage message = new RequestMessage(packet.Object);

            //assert
            Assert.IsNull(message.Peek());
            Assert.IsFalse(message.isMessageRoutable); //shouldn't be able to rout
        }