Esempio n. 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"));
        }
Esempio n. 2
0
 public void ReturnParameter_OrThrowIfNullEmptyOrWhitespace_Ok()
 {
     Assert.DoesNotThrow(() => ReturnParameter.OrThrowIfNullEmptyOrWhitespace("helloWorld", "testString"));
     Assert.AreEqual(ReturnParameter.OrThrowIfNullEmptyOrWhitespace("helloWorld", "testString"), "helloWorld");
 }
Esempio n. 3
0
 public void ReturnParameter_OrThrowIfNullEmptyOrWhitespace_Null()
 {
     Assert.Throws <ArgumentNullException>(() => ReturnParameter.OrThrowIfNullEmptyOrWhitespace(null, "testString"));
 }