Ejemplo n.º 1
0
        public void TestGetMaxPacketSize(int channel, int packageSize)
        {
            inner.GetMaxPacketSize(Arg.Any <int>()).Returns(packageSize);

            Assert.That(middleware.GetMaxPacketSize(channel), Is.EqualTo(packageSize));

            inner.Received(1).GetMaxPacketSize(Arg.Is <int>(x => x == channel));
            inner.Received(0).GetMaxPacketSize(Arg.Is <int>(x => x != channel));
        }