示例#1
0
        public void AppendTrailingBackslash_WithTrailingBackslash()
        {
            // Declare variables
            string path = @"C:\Windows\";

            // Call method
            string result = Path.AppendTrailingSlash(path);

            // Validate
            Assert.AreEqual(@"C:\Windows\", result);
        }
示例#2
0
        public void AppendTrailingSlash_WithTrailingSlash()
        {
            // Declare variables
            string path = @"http://www.catenalogic.com/";

            // Call method
            string result = Path.AppendTrailingSlash(path, '/');

            // Validate
            Assert.AreEqual(@"http://www.catenalogic.com/", result);
        }
示例#3
0
 public void AppendTrailingSlash_EmptyValue()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.AppendTrailingSlash(null));
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.AppendTrailingSlash(string.Empty));
 }