示例#1
0
            public void Shouldly_ShouldThrowException()
            {
                var widget = new Widget();

                Should.Throw <ArgumentOutOfRangeException>(() => widget.Twist(-1));
            }
 public void ShouldCompleteIn_WhenThrowsNonTimeoutException()
 {
     Should.Throw <NotImplementedException>(() => Should.CompleteIn(() => { throw new NotImplementedException(); }, TimeSpan.FromSeconds(1)));
 }
示例#3
0
 public void ShouldThrowWhenInRange()
 {
     Should.Throw <ShouldAssertException>(() => 1.5m.ShouldNotBeInRange(1.4m, 1.6m));
 }