コード例 #1
0
 public void Find_ThrowsException_WhenIndexIsOutOfRange(int index)
 {
     Assert.Throws <IndexOutOfRangeException>(() => system.Find(index));
 }
コード例 #2
0
 public void SystemMustRaseExceptionIfIndexLessThanZero()
 {
     Assert.That(() => ts.Find(-1)
                 , Throws.InstanceOf <IndexOutOfRangeException>()
                 .With.Message.EqualTo("No such index"));
 }