예제 #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());
        }
예제 #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());
        }
예제 #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());
        }