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 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); }