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); }
public void HeightOutsideValidBoxThrowsArgumentOutOfRangeException1() { ShapeStub sut = new ShapeStub(); Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetHeight(-1)); Assert.Throws<ArgumentOutOfRangeException>(() => sut.SetHeight(1281)); //allowed height values (given a 0 value on y) should not throw an exception sut.SetHeight(0); sut.SetHeight(1280); }