use of org.pentaho.metaverse.analyzer.kettle.jobentry.transjob.TransJobEntryAnalyzer in project pentaho-metaverse by pentaho.
the class AnalyzerInfoServiceTest method testGetSupportedEntries.
@Test
public void testGetSupportedEntries() throws Exception {
List<IJobEntryAnalyzer> analyzers = new ArrayList<>();
final TransJobEntryAnalyzer transJobEntryAnalyzer = new TransJobEntryAnalyzer();
analyzers.add(transJobEntryAnalyzer);
when(jobEntryAnalyzerProvider.getAnalyzers()).thenReturn(analyzers);
Response supportedJobEntries = service.getSupportedJobEntries();
assertEquals(Response.Status.OK.getStatusCode(), supportedJobEntries.getStatus());
assertNotNull(supportedJobEntries.getEntity());
assertTrue(supportedJobEntries.getEntity() instanceof List);
List<AnalyzerInfo> responseList = (List<AnalyzerInfo>) supportedJobEntries.getEntity();
assertEquals(analyzers.size(), responseList.size());
// should be sorted based on meta name
assertEquals(transJobEntryAnalyzer.getSupportedEntries().iterator().next().getSimpleName(), responseList.get(0).getMeta());
}
Aggregations