Example #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);
        }
Example #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);
        }
Example #3
0
 public void AppendTrailingSlash_EmptyValue()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.AppendTrailingSlash(null));
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.AppendTrailingSlash(string.Empty));
 }