예제 #1
0
        public void GetDeletedFiles_WhenCalled_ReturnsTrue()
        {
            var oldFiles     = GetRandomFiles(2);
            var changedFiles = oldFiles.Take(1).ToList();

            var diff = new WatchedFiles(oldFiles).GetDeletedFiles(changedFiles);

            Assert.Single(diff);
            Assert.Equal(diff.Single(), oldFiles.Last());
        }
예제 #2
0
        public void GetCreatedFiles_WhenCalled_ReturnsTrue()
        {
            var oldFiles     = GetRandomFiles(1);
            var changedFiles = oldFiles.Concat(GetRandomFiles(1));

            var diff = new WatchedFiles(oldFiles).GetCreatedFiles(changedFiles);

            Assert.Single(diff);
            Assert.Equal(diff.Single(), changedFiles.Last());
        }