Beispiel #1
0
        public void ToPathNameSafeFailsWithNullThis()
        {
            var e = Assert.Throws <ArgumentNullException>(() => StringExtensions.ToPathNameSafe(null));

            Assert.Equal("str", e.ParamName);

            e = Assert.Throws <ArgumentNullException>(() => StringExtensions.ToPathNameSafe(null, string.Empty));
            Assert.Equal("str", e.ParamName);
        }
Beispiel #2
0
        public void ReadWithNullThis()
        {
            var e = Assert.Throws <ArgumentNullException>(() => StringExtensions.Read(null));

            Assert.Equal("str", e.ParamName);
        }