示例#1
0
        public void ReturnParameter_OrThrowIfEmptyOrWhitespace_Whitespace()
        {
            var x = Assert.Throws <ArgumentException>(() => ReturnParameter.OrThrowIfEmptyOrWhitespace(" ", "testString"));

            Assert.That(x.Message, Does.StartWith("Value should not be whitespace"));
        }
示例#2
0
 public void ReturnParameter_OrThrowIfEmptyOrWhitespace_Ok()
 {
     Assert.DoesNotThrow(() => ReturnParameter.OrThrowIfEmptyOrWhitespace("helloWorld", "testString"));
     Assert.AreEqual(ReturnParameter.OrThrowIfEmptyOrWhitespace("helloWorld", "testString"), "helloWorld");
 }
示例#3
0
        public void ReturnParameter_OrThrowIfEmptyOrWhitespace_Null()
        {
            var result = ReturnParameter.OrThrowIfEmptyOrWhitespace(null, "testString");

            Assert.AreEqual(null, result);
        }