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); }
public void WidthOutsideValidBoxShouldThrowArgumentOutOfRangeException1() { ShapeStub sut = new ShapeStub(); Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetWidth(-1)); Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetWidth(128001)); //allowed width values (given a 0 value on x) should not throw an exception sut.SetWidth(0); sut.SetWidth(128000); }