Exemple #1
0
        public void GivenJustOneFileInDirectory_WhenISammleKandidaten_IExpectNoDublette()
        {
            directory.AddFile("a", 1);

            IDublettenprüfung sut = new DuplicateCheck(directory);
            var result            = sut.Sammle_Kandidaten(".");

            Assert.AreEqual(0, result.Count());
        }
Exemple #2
0
        public void GivenFiveFiles_WhenISammleKandidaten_IExpectTwoDublettes()
        {
            directory.AddFile("a", 0);
            directory.AddFile("b", 1);
            directory.AddFile("b", 1);

            IDublettenprüfung sut = new DuplicateCheck(directory);
            var result            = sut.Sammle_Kandidaten(".");

            Assert.AreEqual(1, result.Count());
        }
Exemple #3
0
        public void Given3SameFiles_WhenISammleKandidaten_IExpectOneDubletteWithThreeFiles()
        {
            directory.AddFile("a", 1);
            directory.AddFile("a", 1);
            directory.AddFile("a", 1);

            IDublettenprüfung sut = new DuplicateCheck(directory);
            var result            = sut.Sammle_Kandidaten(".");

            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(3, result.First().Dateipfade.Count());
        }