On 06/11/2007, at 5:16 PM, [EMAIL PROTECTED] wrote:
- adjusted DaysOldRepositoryPurgeTest for the changes
but there's no tests for the actual changes... :)
Modified: maven/archiva/trunk/archiva-base/archiva-consumers/
archiva-core-consumers/src/test/java/org/apache/maven/archiva/
consumers/core/repository/stubs/LuceneRepositoryContentIndexStub.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/
archiva-consumers/archiva-core-consumers/src/test/java/org/apache/
maven/archiva/consumers/core/repository/stubs/
LuceneRepositoryContentIndexStub.java?
rev=592297&r1=592296&r2=592297&view=diff
======================================================================
========
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-
consumers/src/test/java/org/apache/maven/archiva/consumers/core/
repository/stubs/LuceneRepositoryContentIndexStub.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-
consumers/src/test/java/org/apache/maven/archiva/consumers/core/
repository/stubs/LuceneRepositoryContentIndexStub.java Mon Nov 5
22:16:12 2007
@@ -46,7 +46,10 @@
throws RepositoryIndexException
{
// TODO Auto-generated method stub
- Assert.assertEquals( 2, records.size() );
+ if( records.size() != 0 )
+ {
+ Assert.assertEquals( 2, records.size() );
+ }
}
Is this likely to ever give a false-positive if it was meant to be
two, but came out as 0?
Maybe it would be better to define the expected size in the
constructor for the stub? (or use mock objects :)
Thanks,
Brett
--
Brett Porter - [EMAIL PROTECTED]
Blog: http://www.devzuz.org/blogs/bporter/