public void ShouldAddPathsThatAreNotPresent() { // Given PathCollection collection = new PathCollection( new[] { _upperCaseA, _upperCaseB }); // When collection.AddRange(new[] { _upperCaseA, _upperCaseB, _upperCaseC }); // Then Assert.AreEqual(3, collection.Count); }
public void ShouldRespectFileSystemCaseSensitivityWhenAddingPaths(bool caseSensitive, int expectedCount) { // Given PathCollection <TPath> collection = new PathCollection <TPath>( new [] { _upperCaseA, _upperCaseB }); // When collection.AddRange(new [] { _lowerCaseA, _lowerCaseB, _lowerCaseC }); // Then Assert.AreEqual(expectedCount, collection.Count); }
public ActionResult Save(Bam.Net.Analytics.Path[] values) { try { PathCollection saver = new PathCollection(); saver.AddRange(values); saver.Save(); return(Json(new { Success = true, Message = "", Dao = "" })); } catch (Exception ex) { return(GetErrorResult(ex)); } }