public void InRange_InRange_NoException(int underTest) { //Arrange //Act var exception = Record.Exception(() => Guards.Int(underTest, nameof(underTest)) .InRange(-5, 10)); //Assert exception.Should().BeNull(); }
public void NotPositive_Positive_Throws(int underTest) { //Arrange //Act var exception = Record.Exception(() => Guards.Int(underTest, nameof(underTest)) .NotPositive()); //Assert exception.Should().BeOfType <ArgumentException>(); }
public void InRange_NotInRange_Throws(int underTest) { //Arrange //Act var exception = Record.Exception(() => Guards.Int(underTest, nameof(underTest)) .InRange(-5, 10)); //Assert exception.Should().BeOfType <ArgumentException>(); }
public void NotEqual_Equal_Throws() { //Arrange int underTest = 5; //Act var exception = Record.Exception(() => Guards.Int(underTest, nameof(underTest)) .NotEqual(underTest)); //Assert exception.Should().BeOfType <ArgumentException>(); }