org.sakaiproject.tool.gradebook.test
Class GradebookTestBase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.springframework.test.AbstractSpringContextTests
              extended byorg.springframework.test.AbstractDependencyInjectionSpringContextTests
                  extended byorg.springframework.test.AbstractTransactionalSpringContextTests
                      extended byorg.sakaiproject.tool.gradebook.test.GradebookTestBase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
GradableObjectManagerTest, GradebookLoaderBase, GradebookManagerTest, GradebookServiceInternalTest, GradebookServiceTest, GradeManagerTest, StandaloneSectionsDataLoader, TestArchive

public abstract class GradebookTestBase
extends AbstractTransactionalSpringContextTests

Base class for gradebook test classes that provides the spring application context. The database used is an in-memory hsqldb by default, but this can be overridden to test specific database configurations by setting the "mem" system property to "false". In the "mem=false" case, the database configuration is set in the hibernate.properties file in the "hibernate.properties.dir" directory.

Author:
Josh Holtzman

Field Summary
protected  Authn authn
           
protected  Authz authz
           
protected  GradebookManager gradebookManager
           
protected  GradebookService gradebookService
           
protected  GradeManager gradeManager
           
protected  IntegrationSupport integrationSupport
           
protected  SectionAwareness sectionAwareness
           
protected  UserDirectoryService userDirectoryService
           
protected  UserManager userManager
           
 
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
transactionManager, transactionStatus
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
applicationContext, AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO, managedVariableNames
 
Fields inherited from class org.springframework.test.AbstractSpringContextTests
logger
 
Constructor Summary
GradebookTestBase()
           
 
Method Summary
protected  List addUsersEnrollments(Gradebook gradebook, Collection studentUids)
           
protected  String[] getConfigLocations()
           
 IntegrationSupport getIntegrationSupport()
           
 UserManager getUserManager()
           
protected  void onSetUpInTransaction()
           
protected  void setAuthnId(String newUserUid)
           
 void setIntegrationSupport(IntegrationSupport integrationSupport)
           
 void setUserManager(UserManager userManager)
           
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, onSetUp, onSetUpBeforeTransaction, onTearDown, onTearDownAfterTransaction, onTearDownInTransaction, setComplete, setDefaultRollback, setTransactionManager
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
contextKey, getAutowireMode, getLoadCount, initManagedVariableNames, isDependencyCheck, isPopulateProtectedVariables, loadContextLocations, populateProtectedVariables, setAutowireMode, setDependencyCheck, setDirty, setPopulateProtectedVariables, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
contextKeyString, getContext, hasCachedContext, loadContext, setDirty
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

authz

protected Authz authz

authn

protected Authn authn

gradebookManager

protected GradebookManager gradebookManager

gradeManager

protected GradeManager gradeManager

gradebookService

protected GradebookService gradebookService

sectionAwareness

protected SectionAwareness sectionAwareness

userDirectoryService

protected UserDirectoryService userDirectoryService

integrationSupport

protected IntegrationSupport integrationSupport

userManager

protected UserManager userManager
Constructor Detail

GradebookTestBase

public GradebookTestBase()
Method Detail

onSetUpInTransaction

protected void onSetUpInTransaction()
                             throws Exception
Throws:
Exception

getConfigLocations

protected String[] getConfigLocations()
See Also:
AbstractDependencyInjectionSpringContextTests.getConfigLocations()

addUsersEnrollments

protected List addUsersEnrollments(Gradebook gradebook,
                                   Collection studentUids)

getIntegrationSupport

public IntegrationSupport getIntegrationSupport()

setIntegrationSupport

public void setIntegrationSupport(IntegrationSupport integrationSupport)

getUserManager

public UserManager getUserManager()

setUserManager

public void setUserManager(UserManager userManager)

setAuthnId

protected void setAuthnId(String newUserUid)