Example #1
0
        public void TestServerDisconnect(int id, bool result)
        {
            inner.ServerDisconnect(id).Returns(result);

            Assert.That(middleware.ServerDisconnect(id), Is.EqualTo(result));

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