private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.KERNEL;
- private CtfIterator fixture;
+ private CtfTmfTrace trace;
+ private CtfIterator iterator;
/**
* Perform pre-test initialization.
@Before
public void setUp() {
assumeTrue(testTrace.exists());
- fixture = new CtfIterator(testTrace.getTrace());
+ trace = testTrace.getTrace();
+ iterator = new CtfIterator(trace);
CtfLocation ctfLocation = new CtfLocation(new CtfLocationInfo(1, 0));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
+ iterator.setLocation(ctfLocation);
+ iterator.increaseRank();
}
/**
*/
@After
public void tearDown() {
- if (fixture != null) {
- fixture.dispose();
+ if (iterator != null) {
+ iterator.dispose();
}
}
*/
@Test
public void testCtfIterator_noinit() {
- CtfTmfTrace trace = testTrace.getTrace();
CtfIterator result = new CtfIterator(trace);
assertNotNull(result);
}
*/
@Test
public void testCtfIterator_init() {
- CtfTmfTrace trace = testTrace.getTrace();
trace.init("test");
CtfIterator result = new CtfIterator(trace);
*/
@Test
public void testCtfIterator_position() {
- CtfTmfTrace trace = testTrace.getTrace();
long timestampValue = 1L;
long rank = 1L;
CtfIterator result = new CtfIterator(trace, new CtfLocationInfo(timestampValue, 0), rank);
*/
@Test
public void testAdvance() {
- boolean result = fixture.advance();
+ boolean result = iterator.advance();
assertTrue(result);
}
*/
@Test
public void testClone() {
- CtfIterator result = fixture.clone();
+ CtfIterator result = iterator.clone();
assertNotNull(result);
}
*/
@Test
public void testCompareTo() {
- CtfIterator o = new CtfIterator(testTrace.getTrace());
- int result = fixture.compareTo(o);
+ CtfIterator o = new CtfIterator(trace);
+ int result = iterator.compareTo(o);
assertEquals(1L, result);
}
*/
@Test
public void testEquals_other() {
- CtfIterator obj = new CtfIterator(testTrace.getTrace());
+ CtfIterator obj = new CtfIterator(trace);
CtfLocation ctfLocation1 = new CtfLocation(new CtfLocationInfo(1, 0));
obj.setLocation(ctfLocation1);
obj.increaseRank();
- boolean result = fixture.equals(obj);
+ boolean result = iterator.equals(obj);
assertTrue(result);
}
@Test
public void testEquals_empty() {
Object obj = new Object();
- boolean result = fixture.equals(obj);
+ boolean result = iterator.equals(obj);
assertFalse(result);
}
*/
@Test
public void testGetCtfTmfTrace() {
- CtfTmfTrace result = fixture.getCtfTmfTrace();
+ CtfTmfTrace result = iterator.getCtfTmfTrace();
assertNotNull(result);
}
*/
@Test
public void testGetCurrentEvent() {
- CtfTmfEvent result = fixture.getCurrentEvent();
+ CtfTmfEvent result = iterator.getCurrentEvent();
assertNotNull(result);
}
*/
@Test
public void testGetLocation() {
- CtfLocation result = fixture.getLocation();
+ CtfLocation result = iterator.getLocation();
assertNotNull(result);
}
*/
@Test
public void testGetRank() {
- long result = fixture.getRank();
+ long result = iterator.getRank();
assertEquals(1L, result);
}
*/
@Test
public void testHasValidRank() {
- boolean result = fixture.hasValidRank();
+ boolean result = iterator.hasValidRank();
assertTrue(result);
}
*/
@Test
public void testHashCode() {
- int result = fixture.hashCode();
- int result2 = fixture.hashCode();
+ int result = iterator.hashCode();
+ int result2 = iterator.hashCode();
assertEquals(result, result2);
}
*/
@Test
public void testIncreaseRank() {
- fixture.increaseRank();
+ iterator.increaseRank();
}
/**
@Test
public void testSeek() {
long timestamp = 1L;
- boolean result = fixture.seek(timestamp);
+ boolean result = iterator.seek(timestamp);
assertTrue(result);
}
@Test
public void testSetLocation() {
CtfLocation location = new CtfLocation(new CtfLocationInfo(1, 0));
- fixture.setLocation(location);
+ iterator.setLocation(location);
}
}