Esempio n. 1
0
            public void ShouldAddPathsThatAreNotPresent()
            {
                // Given
                PathCollection collection = new PathCollection(
                    new[] { _upperCaseA, _upperCaseB });

                // When
                collection.AddRange(new[] { _upperCaseA, _upperCaseB, _upperCaseC });

                // Then
                Assert.AreEqual(3, collection.Count);
            }
Esempio n. 2
0
            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);
            }
Esempio n. 3
0
 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));
     }
 }