예제 #1
0
        public void Disconnect2()
        {
            transport1
            .When(x => x.Disconnect())
            .Do(x => { throw new PlatformNotSupportedException(); });

            transport.Disconnect();
            transport1.Received().Disconnect();
            transport2.Received().Disconnect();
        }
예제 #2
0
        public void DisconnectNone()
        {
            transport1
            .When(x => x.Disconnect())
            .Do(x => { throw new PlatformNotSupportedException(); });
            transport2
            .When(x => x.Disconnect())
            .Do(x => { throw new PlatformNotSupportedException(); });

            Assert.Throws <PlatformNotSupportedException>(() =>
            {
                transport.Disconnect();
            });
        }