This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumped Nexus to use new fixed Timeline
git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/trunk/nexus/nexus-app@6537 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
- Loading branch information
cstamas
committed
Jun 1, 2010
1 parent
798d6e9
commit 5d6b529
Showing
6 changed files
with
130 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/test/java/org/sonatype/nexus/timeline/AbstractTimelineTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.sonatype.nexus.timeline; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.sonatype.nexus.AbstractNexusTestCase; | ||
import org.sonatype.timeline.TimelineRecord; | ||
import org.sonatype.timeline.TimelineResult; | ||
|
||
public abstract class AbstractTimelineTest | ||
extends AbstractNexusTestCase | ||
{ | ||
/** | ||
* Handy method that does what was done before: keeps all in memory, but this is usable for small amount of data, | ||
* like these in UT. This should NOT be used in production code, unless you want app that kills itself with OOM. | ||
* | ||
* @param result | ||
* @return | ||
*/ | ||
protected List<TimelineRecord> asList( TimelineResult result ) | ||
{ | ||
ArrayList<TimelineRecord> records = new ArrayList<TimelineRecord>(); | ||
|
||
for ( TimelineRecord rec : result ) | ||
{ | ||
records.add( rec ); | ||
} | ||
|
||
return records; | ||
} | ||
} |
Oops, something went wrong.