SchedulerResourceUtil { public static boolean isPdiFile( RepositoryFile file ) { return isTransformation( file ) || isJob( file ); }  static IJobTrigger convertScheduleRequestToJobTrigger( JobScheduleRequest scheduleRequest,
                                                                IScheduler scheduler ); static void updateStartDateForTimeZone( JobScheduleRequest request ); static Date convertDateToServerTimeZone( Date dateTime, String timeZone ); static HashMap<String, Serializable> handlePDIScheduling( RepositoryFile file,
                                                                   HashMap<String, Serializable> parameterMap, Map<String, String> pdiParameters ); static boolean isPdiFile( RepositoryFile file ); static boolean isTransformation( RepositoryFile file ); static boolean isJob( RepositoryFile file ); static String resolveActionId( final String inputFile ); static String getExtension( final String filename ); static final String RESERVEDMAPKEY_LINEAGE_ID; static final String RESERVED_BACKGROUND_EXECUTION_ACTION_ID; }
@Test public void testIsPdiFile_ktr() throws Exception { when( repo.getName() ).thenReturn( "transform.ktr" ); assertTrue( SchedulerResourceUtil.isPdiFile( repo ) ); }
@Test public void testIsPdiFile_kjb() throws Exception { when( repo.getName() ).thenReturn( "job.kjb" ); assertTrue( SchedulerResourceUtil.isPdiFile( repo ) ); }
@Test public void testIsPdiFile_txt() throws Exception { when( repo.getName() ).thenReturn( "readme.txt" ); assertFalse( SchedulerResourceUtil.isPdiFile( repo ) ); }
@Test public void testIsPdiFile_null() throws Exception { assertFalse( SchedulerResourceUtil.isPdiFile( null ) ); }