use of org.eclipse.tracecompass.tmf.tests.stubs.analysis.ondemand.OnDemandAnalysisStub in project tracecompass by tracecompass.
the class OnDemandAnalysisTest method testGetAnalysisFromTrace.
/**
* Test getting an analysis via the manager. The expected way of doing
* things.
*/
@Test
public void testGetAnalysisFromTrace() {
ITmfTrace trace = fTraceThatApplies;
assertNotNull(trace);
Set<IOnDemandAnalysis> set1 = OnDemandAnalysisManager.getInstance().getOndemandAnalyses(trace);
assertEquals(1, set1.size());
assertTrue(Iterables.getOnlyElement(set1) instanceof OnDemandAnalysisStub);
/* Make sure it is still true on a subsequent call */
Set<IOnDemandAnalysis> set2 = OnDemandAnalysisManager.getInstance().getOndemandAnalyses(trace);
assertTrue(set1.equals(set2));
}
Aggregations