package com.vackosar.gitflowincrementalbuild;

import org.junit.Assert;
import org.junit.Test;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class DiffListerTest extends RepoTest {

    @Test
    public void list() throws Exception {
        String workDir = RepoMock.TEST_WORK_DIR + "tmp/repo/";
        final Set<Path> expected = new HashSet<>(Arrays.asList(
                Paths.get(workDir + "/parent/child2/subchild2/src/resources/file2"),
                Paths.get(workDir + "/parent/child2/subchild2/src/resources/file22"),
                Paths.get(workDir + "/parent/child3/src/resources/file1"),
                Paths.get(workDir + "/parent/child4/pom.xml")
                ));
        Assert.assertEquals(expected, new DiffLister().act());
    }

}

@@ -843,10 +843,584 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void listInSubdir() throws Exception %7B%0A        Path workDir = Paths.get(RepoMock.TEST_WORK_DIR).resolve(%22tmp/repo/parent/child2%22);%0A        final Set%3CPath%3E expected = new HashSet%3C%3E(Arrays.asList(%0A                workDir.resolve(%22subchild2/src/resources/file2%22),%0A                workDir.resolve(%22subchild2/src/resources/file22%22),%0A                workDir.resolve(%22../child3/src/resources/file1%22).normalize(),%0A                workDir.resolve(%22../child4/pom.xml%22).normalize()%0A        ));%0A        Assert.assertEquals(expected, new DiffLister().act());%0A    %7D%0A%0A
 %7D%0A

Add listInSubdir.