Skip to content

Commit 2628721

Browse files
author
Igor Fedorenko
committed
refining test build context implementation
git-svn-id: file:///opt/svn/repositories/sonatype.org/spice/trunk/plexus-build-api@894 5751e0cb-dcb7-432f-92e2-260806df54be
1 parent 43a0977 commit 2628721

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/java/org/sonatype/plexus/build/incremental/test/TestIncrementalBuildContext.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030

3131
public class TestIncrementalBuildContext implements BuildContext {
3232

33-
private final File basedir;
33+
private final File basedir;
34+
35+
private final HashSet refresh = new HashSet();
3436

3537
private static final class TestScanner implements Scanner {
3638
private final File basedir;
@@ -113,6 +115,7 @@ public Scanner newDeleteScanner(File basedir) {
113115
}
114116

115117
public OutputStream newFileOutputStream(File file) throws IOException {
118+
refresh(file);
116119
return new FileOutputStream(file);
117120
}
118121

@@ -131,6 +134,7 @@ public Scanner newScanner(File basedir, boolean ignoreDelta) {
131134
}
132135

133136
public void refresh(File file) {
137+
refresh.add(file.getAbsoluteFile());
134138
}
135139

136140
public Object getValue(String key) {
@@ -141,4 +145,8 @@ public void setValue(String key, Object value) {
141145
context.put(key, value);
142146
}
143147

148+
public Set getRefreshFiles() {
149+
return refresh;
150+
}
151+
144152
}

0 commit comments

Comments
 (0)