Beispiel #1
0
        public void MethodShouldTimeout_WhenTimeoutsAreNotIgnored()
        {
            var classToProxy = new CancellableWithOverrunnningMethod();
            var proxy        = CommandInterceptor.CreateProxy <ICancellableTimeoutPreserved>(classToProxy);

            Assert.Throws <CommandTimeoutException>(() => proxy.CancellableMethod(CancellationToken.None));
        }
 public void MethodShouldTimeout_WhenTimeoutsAreNotIgnored()
 {
     var classToProxy = new CancellableWithOverrunnningMethod();
     var proxy = CommandInterceptor.CreateProxy<ICancellableTimeoutPreserved>(classToProxy);
     Assert.Throws<CommandFailedException>(() => proxy.CancellableMethod(CancellationToken.None));
 }