Exemple #1
0
        public void ReturnParameter_OrThrowIfNullEmptyOrWhitespace_Whitespace()
        {
            var x = Assert.Throws <ArgumentException>(() => ReturnParameter.OrThrowIfNullEmptyOrWhitespace(" ", "testString"));

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