private List<InvalidRepositoryContentConsumer> selectedInvalidConsumers;
- private Date startTime;
-
/**
* <p>
* Get the list of Ids associated with those {@link KnownRepositoryContentConsumer} that have
{
this.selectedInvalidConsumers = selectedInvalidConsumers;
}
-
- public void setStartTime( Date startTime )
- {
- this.startTime = startTime;
- }
- public Date getStartTime()
- {
- startTime = new Date( System.currentTimeMillis() );
-
- return startTime;
+ protected Date getStartTime()
+ {
+ return new Date( System.currentTimeMillis() );
}
public void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration )
public class RepositoryContentConsumersStub
extends RepositoryContentConsumers
-{
- private Date startTimeForTest;
-
- public void setStartTime( Date startTimeForTest )
- {
- this.startTimeForTest = startTimeForTest;
- }
-
+{
public Date getStartTime()
{
+ Date startTimeForTest = new Date( System.currentTimeMillis() );
+ startTimeForTest.setTime( 12345678 );
+
return startTimeForTest;
}
}
File testFile = getTestFile( "target/test-repo/path/to/test-file.txt" );
Date startTime = new Date( System.currentTimeMillis() );
+ startTime.setTime( 12345678 );
selectedKnownConsumer.beginScan( repo, startTime );
selectedKnownConsumer.getExcludes();
selectedInvalidConsumer.beginScan( repo, startTime );
// invalidConsumer.completeScan();
invalidControl.replay();
-
- consumers.setStartTime( startTime );
+
consumers.executeConsumers( repo, testFile );
knownControl.verify();