public void ReturnParameter_OrThrowIfNullEmptyOrWhitespace_Whitespace() { var x = Assert.Throws <ArgumentException>(() => ReturnParameter.OrThrowIfNullEmptyOrWhitespace(" ", "testString")); Assert.That(x.Message, Does.StartWith("Value should not be whitespace")); }
public void ReturnParameter_OrThrowIfNullEmptyOrWhitespace_Ok() { Assert.DoesNotThrow(() => ReturnParameter.OrThrowIfNullEmptyOrWhitespace("helloWorld", "testString")); Assert.AreEqual(ReturnParameter.OrThrowIfNullEmptyOrWhitespace("helloWorld", "testString"), "helloWorld"); }
public void ReturnParameter_OrThrowIfNullEmptyOrWhitespace_Null() { Assert.Throws <ArgumentNullException>(() => ReturnParameter.OrThrowIfNullEmptyOrWhitespace(null, "testString")); }