Package org.pentaho.platform.api.scheduler2

Examples of org.pentaho.platform.api.scheduler2.SimpleJobTrigger


  @Test
  public void testGetJobsError() throws Exception {
    Boolean asCronString = Boolean.FALSE;

    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).getJobs();

    try {
      schedulerResource.getJobs( asCronString );
      fail();
View Full Code Here


    verify( schedulerResource, times( 1 ) ).buildPlainTextOkResponse( state );
  }

  @Test
  public void testGetStateError() throws Exception {
    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).getState();

    try {
      schedulerResource.getState();
      fail();
View Full Code Here

    verify( schedulerResource, times( 1 ) ).buildPlainTextOkResponse( status );
  }

  @Test
  public void testStartError() throws Exception {
    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).start();

    try {
      schedulerResource.start();
      fail();
View Full Code Here

    verify( schedulerResource, times( 1 ) ).buildPlainTextOkResponse( status );
  }

  @Test
  public void testPauseError() throws Exception {
    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).pause();

    try {
      schedulerResource.pause();
      fail();
View Full Code Here

    verify( schedulerResource, times( 1 ) ).buildPlainTextOkResponse( status );
  }

  @Test
  public void testShutdownError() throws Exception {
    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).shutdown();

    try {
      schedulerResource.shutdown();
      fail();
View Full Code Here

    Response testResponse = schedulerResource.getJobState( mockJobRequest );
    assertEquals( mockUnauthorizedResponse, testResponse );

    // Test 2
    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).getJobState( mockJobRequest );

    try {
      schedulerResource.getJobState( mockJobRequest );
      fail();
View Full Code Here

    String jobId = "jobId";

    JobRequest mockJobRequest = mock( JobRequest.class );
    doReturn( jobId ).when( mockJobRequest ).getJobId();

    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).pauseJob( jobId );

    try {
      schedulerResource.pauseJob( mockJobRequest );
      fail();
View Full Code Here

    String jobId = "jobId";

    JobRequest mockJobRequest = mock( JobRequest.class );
    doReturn( jobId ).when( mockJobRequest ).getJobId();

    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).resumeJob( jobId );

    try {
      schedulerResource.resumeJob( mockJobRequest );
      fail();
View Full Code Here

    String jobId = "jobId";

    JobRequest mockJobRequest = mock( JobRequest.class );
    doReturn( jobId ).when( mockJobRequest ).getJobId();

    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).removeJob( jobId );

    try {
      schedulerResource.removeJob( mockJobRequest );
      fail();
View Full Code Here

  @Test
  public void testGetJobError() throws Exception {
    String jobId = "jobId";
    String asCronString = "asCronString";

    SchedulerException mockSchedulerException = mock( SchedulerException.class );
    doThrow( mockSchedulerException ).when( schedulerResource.schedulerService ).getJobInfo( jobId );

    try {
      schedulerResource.getJob( jobId, asCronString );
      fail();
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.scheduler2.SimpleJobTrigger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.