protected void AssertPathContainsExpectedLocations(string path, params string[] additionalLocations) { var actualLocations = new PathEnvironmentVariable(path).Locations; var expectedLocations = new PathEnvironmentVariable(OriginalPath).AddLocations(additionalLocations).Locations; CollectionAssert.AreEquivalent(expectedLocations, actualLocations); }
protected void AssertPathContainsOnlyLocationsInOriginalPath(string path) { var actualLocations = new PathEnvironmentVariable(path).Locations; var expectedLocations = new PathEnvironmentVariable(OriginalPath).Locations; CollectionAssert.AreEquivalent(expectedLocations, actualLocations); }
public bool IsEquivalentTo(PathEnvironmentVariable other) { return Locations.Length == other.Locations.Length && Locations.All(l => other.Locations.Contains(l, StringComparer.InvariantCultureIgnoreCase)); }