Пример #1
0
        public void AddTrailingForwardSlashTest()
        {
            String s = null;

            Assert.Throws <ArgumentNullException>(() => s.AddTrailingForwardSlash());

            s = "";
            Assert.AreEqual("/", s.AddTrailingForwardSlash());

            s = "a";
            Assert.AreEqual("a/", s.AddTrailingForwardSlash());

            s = "a/";
            Assert.AreEqual("a/", s.AddTrailingForwardSlash());

            s = "a//";
            Assert.AreEqual("a//", s.AddTrailingForwardSlash());

            s = "a/ ";
            Assert.AreEqual("a/ /", s.AddTrailingForwardSlash());
        }