public void AppendTrailingBackslash_WithTrailingBackslash() { // Declare variables string path = @"C:\Windows\"; // Call method string result = Path.AppendTrailingSlash(path); // Validate Assert.AreEqual(@"C:\Windows\", result); }
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); }
public void AppendTrailingSlash_EmptyValue() { ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.AppendTrailingSlash(null)); ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.AppendTrailingSlash(string.Empty)); }