示例#1
0
 public void YOutsideValidBoxShouldThrowArgumentOutOfRangeException1()
 {
     ShapeStub sut = new ShapeStub();
     Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetY(-1));
     Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetY(1281));
     //allowed y values (given a 0 value on height) should not throw an exception
     sut.SetY(0);
     sut.SetY(1280);
 }
示例#2
0
 public void YOutsideValidBoxShouldThrowArgumentOutOfRangeException2()
 {
     ShapeStub sut = new ShapeStub();
     sut.SetHeight(1270);
     Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetY(11));
     //allowed y values (given a certain height value) should not throw an exception
     sut.SetY(10);
 }