public void ScriptSymbolPathDefault() { StackHashSearchPath symbolPath = StackHashSearchPath.DefaultSymbolPath; Assert.AreEqual(1, symbolPath.Count); Assert.AreEqual(true, symbolPath[0].Contains(@"SRV*")); Assert.AreEqual(true, symbolPath[0].Contains(@"http://msdl.microsoft.com/download/symbols")); }
public static StackHashSearchPath StringToSearchPath(string s) { StackHashSearchPath searchPath = new StackHashSearchPath(); if (!string.IsNullOrEmpty(s)) { string[] pathElements = s.Split(new char[] { SearchPathSeparator }, StringSplitOptions.RemoveEmptyEntries); foreach (string element in pathElements) { searchPath.Add(element); } } return(searchPath); }
public void ScriptSymbolPathGetFullMultipleEntries() { StackHashSearchPath symbolPath = new StackHashSearchPath(); symbolPath.Add("c:\\path1"); symbolPath.Add("c:\\path2"); symbolPath.Add("c:\\path3"); symbolPath.Add("c:\\path4"); String fullPath = symbolPath.FullPath; String[] pathElements = fullPath.Split(new char [] { ';' }); for (int i = 0; i < pathElements.Length - 1; i++) { Assert.AreEqual(pathElements[i], "c:\\path" + (i + 1).ToString()); } }
public static string SearchPathToString(StackHashSearchPath searchPath) { string s = string.Empty; if ((searchPath != null) && (searchPath.Count > 0)) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < searchPath.Count; i++) { sb.Append(searchPath[i]); if (i < (searchPath.Count - 1)) { sb.Append(SearchPathSeparator); } } s = sb.ToString(); } return(s); }
public void ScriptSymbolPathConstructor() { StackHashSearchPath symbolPath = new StackHashSearchPath(); Assert.AreEqual(0, symbolPath.Count); }