public void Should_Respect_File_System_Case_Sensitivity_When_Removing_Paths(bool caseSensitive, int expectedCount)
                {
                    // Given
                    var collection = new FilePathCollection(new FilePath[] { "A.TXT", "B.TXT" }, new PathComparer(caseSensitive));

                    // When
                    collection.Remove(new FilePath[] { "a.txt", "b.txt", "c.txt" });

                    // Then
                    Assert.Equal(expectedCount, collection.Count);
                }
Example #2
0
                public void Should_Throw_If_Paths_Is_Null()
                {
                    // Given
                    var collection = new FilePathCollection();

                    // When
                    var result = Record.Exception(() => collection.Remove((IEnumerable <FilePath>)null));

                    // Then
                    result.ShouldBeOfType <ArgumentNullException>()
                    .And().ParamName.ShouldBe("paths");
                }
Example #3
0
                public void Should_Respect_File_System_Case_Sensitivity_When_Removing_Path(bool caseSensitive, int expectedCount)
                {
                    // Given
                    var collection = new FilePathCollection(new PathComparer(caseSensitive));

                    collection.Add(new FilePath("A.TXT"));

                    // When
                    collection.Remove(new FilePath("a.txt"));

                    // Then
                    Assert.AreEqual(expectedCount, collection.Count);
                }
                public void Should_Respect_File_System_Case_Sensitivity_When_Removing_Paths(bool caseSensitive, int expectedCount)
                {
                    // Given
                    var collection = new FilePathCollection(new FilePath[] { "A.TXT", "B.TXT" }, new PathComparer(caseSensitive));

                    // When
                    collection.Remove(new FilePath[] { "a.txt", "b.txt", "c.txt" });

                    // Then
                    Assert.Equal(expectedCount, collection.Count);
                }