public void TargetDir_OneSlash() { string targetDir = @"C:\Program Files (x86)\Brown and Caldwell\Project Folder Tool\"; string expectedDir = @"C:\Program Files (x86)\Brown and Caldwell\Project Folder Tool\"; Assert.AreEqual(expectedDir, AddToPath.cleanTargetDir(targetDir)); }
public void RemovePath_NotInPath() { string targetDir = @"C:\Program Files (x86)\Brown and Caldwell\Project Folder Tool\"; string currentPath = @"C:\Program Files\dotnet\;"; string newPath = AddToPath.removeFromPath(currentPath, targetDir); Assert.AreEqual(@"C:\Program Files\dotnet\;", newPath); }
public void AddPath_AlreadyInPath() { string targetDir = @"C:\Program Files (x86)\Brown and Caldwell\Project Folder Tool\"; string currentPath = @"C:\Program Files\dotnet\;C:\Program Files (x86)\Brown and Caldwell\Project Folder Tool\;"; string expectedPath = @"C:\Program Files\dotnet\;C:\Program Files (x86)\Brown and Caldwell\Project Folder Tool\;"; string newPath = AddToPath.addToPath(currentPath, targetDir); Assert.AreEqual(expectedPath, newPath); }