Exemple #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"));
        }
Exemple #2
0
 public void ReturnParameter_OrThrowIfEmptyOrWhitespace_Ok()
 {
     Assert.DoesNotThrow(() => ReturnParameter.OrThrowIfEmptyOrWhitespace("helloWorld", "testString"));
     Assert.AreEqual(ReturnParameter.OrThrowIfEmptyOrWhitespace("helloWorld", "testString"), "helloWorld");
 }
Exemple #3
0
        public void ReturnParameter_OrThrowIfEmptyOrWhitespace_Null()
        {
            var result = ReturnParameter.OrThrowIfEmptyOrWhitespace(null, "testString");

            Assert.AreEqual(null, result);
        }