コード例 #1
0
ファイル: ShapeTest.cs プロジェクト: hl222ih/2DV610.1
 public void XOutsideValidBoxShouldThrowArgumentOutOfRangeException2()
 {
     ShapeStub sut = new ShapeStub();
     sut.SetWidth(127990);
     Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetX(11));
     //allowed x values (given a certain width value) should not throw an exception
     sut.SetX(10);
 }
コード例 #2
0
ファイル: ShapeTest.cs プロジェクト: hl222ih/2DV610.1
 public void XOutsideValidBoxShouldThrowArgumentOutOfRangeException1()
 {
     ShapeStub sut = new ShapeStub();
     Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetX(-1));
     Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetX(128001));
     //allowed x values (given a 0 value on width) should not throw an exception
     sut.SetX(0);
     sut.SetX(128000);
 }