Advertisement
encho253

Untitled

Jan 29th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1.  [Test]
  2.         public void TestStudentID_ToThrowIndexOutOfRangeException_IfIdIsLessThan10000()
  3.         {
  4.             Student student = new Student("Petko", 22256);
  5.  
  6.             Assert.Throws<IndexOutOfRangeException>(() => student.ID = 8990);
  7.         }
  8.  
  9.         [Test]
  10.         public void TestStudentID_ToThrowIndexOutOfRangeException_IfIdIsBiggerThan99999()
  11.         {
  12.             Student student = new Student("Maria", 44556);
  13.  
  14.             Assert.Throws<IndexOutOfRangeException>(() => student.ID = 100000);
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement