Search in sources :

Example 1 with JobEntrySuccess

use of org.pentaho.di.job.entries.success.JobEntrySuccess in project pentaho-metaverse by pentaho.

the class JobMetaJsonSerializerTest method testSerializeSteps.

@Test
public void testSerializeSteps() throws Exception {
    when(meta.nrJobEntries()).thenReturn(2);
    JobEntryCopy jobEntryCopy = mock(JobEntryCopy.class);
    JobEntryInterface jobEntryInterface = new JobEntrySuccess("name", "description");
    when(meta.getJobEntry(anyInt())).thenReturn(jobEntryCopy);
    when(meta.getName()).thenReturn("JobMeta");
    when(jobEntryCopy.getName()).thenReturn("JobEntry");
    when(jobEntryCopy.getEntry()).thenReturn(jobEntryInterface);
    serializer.serializeSteps(meta, json);
    verify(json, times(2)).writeObject(jobEntryInterface);
}
Also used : JobEntryCopy(org.pentaho.di.job.entry.JobEntryCopy) JobEntryInterface(org.pentaho.di.job.entry.JobEntryInterface) JobEntrySuccess(org.pentaho.di.job.entries.success.JobEntrySuccess) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 JobEntrySuccess (org.pentaho.di.job.entries.success.JobEntrySuccess)1 JobEntryCopy (org.pentaho.di.job.entry.JobEntryCopy)1 JobEntryInterface (org.pentaho.di.job.entry.JobEntryInterface)1