public void ThrowExceptionIfNullOrContainsInvalidString_WithNullArgument_ShouldThrow_ArgumentNullException( string[] toCheck) { //Act Action act = () => StringArgumentChecking.ThrowExceptionIfNullOrContainsInvalidString(toCheck, nameof(toCheck)); //Assert act.Should().ThrowExactly <ArgumentNullException>().Where(e => e.Message.Contains(nameof(toCheck))); }
public void ThrowExceptionIfContainsInvalidString_WithValidStrings_ShouldNotThrow_ArgumentException( string[] toCheck) { //Act Action act = () => StringArgumentChecking.ThrowExceptionIfNullOrContainsInvalidString(toCheck, nameof(toCheck)); //Assert act.Should().NotThrow(); }