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