use of org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoaderTimeTest method verifySynchToTimeEqualsLast.
/**
* Test Case: 006
* Description: Verify synchToTime (timestamp of last message in page)
* Verified Methods: loader.syncToTime(), loader.moveToMessage(), loader.moveToPage(), loader.moveToMessageInPage()
* Expected result: Move to correct page, selection of last message in page.
*/
@Test
public void verifySynchToTimeEqualsLast() {
fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_006_TIME_VALUE));
fFacility.getLoader().waitForCompletion();
fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY);
assertEquals("synchToTime", TC_006_PAGE_VALUE, fFacility.getLoader().currentPage());
selection = fFacility.getSdView().getSDWidget().getSelection();
assertNotNull("synchToTime", selection);
assertEquals("synchToTime", 1, selection.size());
msg = (TmfSyncMessage) selection.get(0);
assertEquals("synchToTime", TC_006_START_OCCURRANCE, msg.getStartOccurrence());
assertEquals("synchToTime", TC_006_END_OCCURRANCE, msg.getEndOccurrence());
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoaderTimeTest method verifySynchToTimeBeforeExpStart.
/**
* Test Case: 004
* Description: Verify synchToTime (timestamp < experiment time range start)
* Verified Methods: loader.syncToTime(), loader.moveToMessage(), loader.moveToPage()
* Expected result: Move to first page, focus on the beginning of the page, but no selection.
*/
@Test
public void verifySynchToTimeBeforeExpStart() {
fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TmfTimestamp.BIG_BANG));
fFacility.getLoader().waitForCompletion();
fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY);
assertEquals("synchToTime", TC_004_PAGE_VALUE, fFacility.getLoader().currentPage());
selection = fFacility.getSdView().getSDWidget().getSelection();
assertNotNull("synchToTime", selection);
assertEquals("synchToTime", 0, selection.size());
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoaderTimeTest method verifySynchToTimeAfterExpEnd.
/**
* Test Case: 005
* Description: Verify synchToTime (timestamp > experiment time range end)
* Verified Methods: loader.syncToTime(), loader.moveToMessage(), loader.moveToPage()
* Expected result: Move to last page, focus on the end of the page, but no selection.
*/
@Test
public void verifySynchToTimeAfterExpEnd() {
fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TmfTimestamp.BIG_CRUNCH));
fFacility.getLoader().waitForCompletion();
fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY);
assertEquals("synchToTime", TC_005_PAGE_VALUE, fFacility.getLoader().currentPage());
selection = fFacility.getSdView().getSDWidget().getSelection();
assertNotNull(selection);
assertEquals("synchToTime", 0, selection.size());
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoaderTimeTest method verifySynchToTimeNonExisting.
/**
* Test Case: 003
* Description: Verify synchToTime (timestamp doesn't exist in trace), no selection of message in page
* Verified Methods: loader.syncToTime(), loader.moveToMessage(), loader.moveToPage()
* Expected result: Move to correct page, currentTime is updated so that focus on the currentTime, but no selection.
*/
@Test
public void verifySynchToTimeNonExisting() {
fFacility.getLoader().firstPage();
fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_003_TIME_VALUE));
fFacility.getLoader().waitForCompletion();
fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY);
assertEquals("synchToTime", 0, TC_003_TIME_VALUE.compareTo(fFacility.getLoader().getCurrentTime()));
assertEquals("synchToTime", TC_003_PAGE_VALUE, fFacility.getLoader().currentPage());
selection = fFacility.getSdView().getSDWidget().getSelection();
assertNotNull("synchToTime", selection);
assertEquals("synchToTime", 0, selection.size());
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoaderTimeTest method verifySynchToTimeOutsidePage.
/**
* Test Case: 002
* Description: Verify synchToTime (exact time outside of page), selection of message in page
* Verified Methods: loader.syncToTime(), loader.moveToMessage(), loader.moveToPage()
* Expected result: Correct message is selected.
*/
@Test
public void verifySynchToTimeOutsidePage() {
fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(this, TC_002_TIME_VALUE));
fFacility.getLoader().waitForCompletion();
fFacility.delay(IUml2SDTestConstants.GUI_REFESH_DELAY);
assertEquals("synchToTime", TC_002_PAGE_VALUE, fFacility.getLoader().currentPage());
selection = fFacility.getSdView().getSDWidget().getSelection();
assertNotNull("synchToTime", selection);
assertEquals("synchToTime", 1, selection.size());
assertTrue("synchToTime", selection.get(0) instanceof TmfSyncMessage);
msg = (TmfSyncMessage) selection.get(0);
assertEquals("synchToTime", TC_002_MESSAGE_NAME, msg.getName());
assertEquals(0, TC_002_TIME_VALUE.compareTo(msg.getStartTime()));
assertEquals("synchToTime", TC_002_START_OCCURRANCE, msg.getStartOccurrence());
assertEquals("synchToTime", TC_002_END_OCCURRANCE, msg.getEndOccurrence());
assertEquals(TC_002_START_LIFELINE, msg.getStartLifeline().getName());
assertEquals(TC_002_END_LIFELINE, msg.getEndLifeline().getName());
}
Aggregations