public void NotNull_Null_Throws() { //Arrange string underTest = null; //Act var exception = Record.Exception(() => Guards.String(underTest, nameof(underTest)) .NotNull()); //Assert exception.Should().BeOfType <ArgumentException>(); }
public void Equals_NotEquals_Throws() { //Arrange string underTest = "NotEqualString"; //Act var exception = Record.Exception(() => Guards.String(underTest, nameof(underTest)) .Equal("AnotherString")); //Assert exception.Should().BeOfType <ArgumentException>(); }