示例#1
0
            public void WhenNullOrEmptyOrWhitespace_ThenThrowException(string value)
            {
                var ex = Assert.Throws <ArgumentNullOrWhiteSpaceException>(() => ArgMustBe.NotNullOrWhiteSpace(value));

                Assert.That(ex.ParamName, Is.Null);
            }
示例#2
0
            public void WhenParamNamePassedIn_ThenSetExceptionParamName()
            {
                var ex = Assert.Throws <ArgumentNullOrWhiteSpaceException>(() => ArgMustBe.NotNullOrWhiteSpace(null, "value"));

                Assert.That(ex.ParamName, Is.EqualTo("value"));
            }
示例#3
0
            public void WhenNotNullOrWhiteSpace_ThenNotThrowException()
            {
                const string param = "Test";

                Assert.DoesNotThrow(() => ArgMustBe.NotNullOrWhiteSpace(param));
            }