예제 #1
0
        public void IsNotNullOrWhitespace_When_Argument_Is_Empty_String_Should_Throw_ArgumentException()
        {
            var ex = Assert.Throws <ArgumentException>(
                () => Invariant.IsNotNullOrWhitespace(string.Empty, PARAMETER_NAME));

            Assert.AreEqual($"Argument '{PARAMETER_NAME}' must not be empty or whitespace.", ex.Message);
        }
예제 #2
0
        public void IsNotNullOrWhitespace_When_Argument_Is_Null_Should_Throw_ArgumentNullException()
        {
            var ex = Assert.Throws <ArgumentNullException>(() => Invariant.IsNotNullOrWhitespace(null, PARAMETER_NAME));

            Assert.AreEqual(PARAMETER_NAME, ex.ParamName);
        }