public void GuardForNullOrEmptyMustNotThorwArgumentNullExceptionWhenTheStringHasValue() { var @string = "Is not null."; var exception = Record.Exception(() => StringGuard.ForNullOrEmpty(@string, nameof(@string))); Assert.Null(exception); }
public void GuardForNullOrEmptyMustThorwArgumentNullExceptionWhenTheStringIsNull() { string? @string = null; Type expected = GetArgumentNullExceptionType(); Assert.Throws(expected, () => StringGuard.ForNullOrEmpty(@string, nameof(@string))); }