org.alfresco.repo.action.scheduled
Class ScheduledPersistedActionServiceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.action.scheduled.ScheduledPersistedActionServiceTest
All Implemented Interfaces:
junit.framework.Test

public class ScheduledPersistedActionServiceTest
extends junit.framework.TestCase

Unit tests for the ScheduledPersistedActionService


Nested Class Summary
protected static class ScheduledPersistedActionServiceTest.TestAction
           
static class ScheduledPersistedActionServiceTest.TestJob
          For unit testing only - not thread safe!
 
Constructor Summary
ScheduledPersistedActionServiceTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testActionToTrigger()
          Tests that the to-trigger stuff works properly
 void testAsTriggerLastRun()
          Tests that the triggers are suitably tweaked based on when the last run occured
 void testCreateSaveLoad()
           
 void testCreation()
          Tests that we can create, save, edit, delete etc the scheduled persisted actions
 void testDeletion()
          Ensures that deletion works correctly
 void testEditing()
          Ensures that we can create, save, edit, save load, edit, save, load etc, all without problems, and without creating duplicates
 void testExecution()
          Tests that things actually get run correctly.
 void testJobBeanInjection()
          Tests that things get properly injected onto the job bean
 void testLoadFromAction()
           
 void testLoadList()
          Tests that the listings work, both of all scheduled, and from an action
 void testMultipleExecutions()
          Tests that when we have more than one schedule defined and active, then the correct things run at the correct times, and we never get confused
 void testPersistedActionImpl()
          Test that the ScheduledPersistedAction implementation behaves properly
 void testStartup()
          Tests that the startup registering works properly
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScheduledPersistedActionServiceTest

public ScheduledPersistedActionServiceTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testPersistedActionImpl

public void testPersistedActionImpl()
                             throws java.lang.Exception
Test that the ScheduledPersistedAction implementation behaves properly

Throws:
java.lang.Exception

testActionToTrigger

public void testActionToTrigger()
                         throws java.lang.Exception
Tests that the to-trigger stuff works properly

Throws:
java.lang.Exception

testAsTriggerLastRun

public void testAsTriggerLastRun()
                          throws java.lang.Exception
Tests that the triggers are suitably tweaked based on when the last run occured

Throws:
java.lang.Exception

testCreation

public void testCreation()
Tests that we can create, save, edit, delete etc the scheduled persisted actions


testCreateSaveLoad

public void testCreateSaveLoad()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testEditing

public void testEditing()
                 throws java.lang.Exception
Ensures that we can create, save, edit, save load, edit, save, load etc, all without problems, and without creating duplicates

Throws:
java.lang.Exception

testLoadList

public void testLoadList()
                  throws java.lang.Exception
Tests that the listings work, both of all scheduled, and from an action

Throws:
java.lang.Exception

testLoadFromAction

public void testLoadFromAction()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testStartup

public void testStartup()
                 throws java.lang.Exception
Tests that the startup registering works properly

Throws:
java.lang.Exception

testDeletion

public void testDeletion()
                  throws java.lang.Exception
Ensures that deletion works correctly

Throws:
java.lang.Exception

testJobBeanInjection

public void testJobBeanInjection()
                          throws java.lang.Exception
Tests that things get properly injected onto the job bean

Throws:
java.lang.Exception

testExecution

public void testExecution()
                   throws java.lang.Exception
Tests that things actually get run correctly. Each sub-test runs in its own transaction

Throws:
java.lang.Exception

testMultipleExecutions

public void testMultipleExecutions()
                            throws java.lang.Exception
Tests that when we have more than one schedule defined and active, then the correct things run at the correct times, and we never get confused

Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.