com.stratelia.webactiv.almanach
Class BaseAlmanachTest

java.lang.Object
  extended by com.silverpeas.components.model.AbstractJndiCase
      extended by com.stratelia.webactiv.almanach.BaseAlmanachTest
Direct Known Subclasses:
AlmanachBmEJBTest, EventDAOTest, EventOccurrencesGeneratorTest

public abstract class BaseAlmanachTest
extends com.silverpeas.components.model.AbstractJndiCase

Base class for tests in the almanach component. It prepares the database to use in tests.


Field Summary
static String[] almanachIds
          The all available almanach instances in tests.
static int TEST_MONTH
          The month to use in tests: april.
static int TEST_YEAR
          The year to use in tests: 2011
 
Fields inherited from class com.silverpeas.components.model.AbstractJndiCase
baseTest
 
Constructor Summary
BaseAlmanachTest()
           
 
Method Summary
 void bootstrapDatabase()
           
static Date dateToUseInTests()
           
static void generalSetUp()
           
 Connection getConnection()
           
static Date getDate(int year, int month, int day)
           
 void shutdownDatabase()
           
 
Methods inherited from class com.silverpeas.components.model.AbstractJndiCase
executeDDL, loadDDL, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_MONTH

public static final int TEST_MONTH
The month to use in tests: april.

See Also:
Constant Field Values

TEST_YEAR

public static final int TEST_YEAR
The year to use in tests: 2011

See Also:
Constant Field Values

almanachIds

public static final String[] almanachIds
The all available almanach instances in tests.

Constructor Detail

BaseAlmanachTest

public BaseAlmanachTest()
Method Detail

generalSetUp

public static void generalSetUp()
                         throws IOException,
                                NamingException,
                                Exception
Throws:
IOException
NamingException
Exception

bootstrapDatabase

public void bootstrapDatabase()
                       throws Exception
Throws:
Exception

shutdownDatabase

public void shutdownDatabase()
                      throws Exception
Throws:
Exception

getConnection

public Connection getConnection()

dateToUseInTests

public static Date dateToUseInTests()

getDate

public static Date getDate(int year,
                           int month,
                           int day)


Copyright © 2016 Silverpeas. All Rights Reserved.