Keel 2.1RC2

org.keel.util.test
Class AbstractKeelServiceTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.keel.util.test.AbstractKeelTest
              extended byorg.keel.util.test.AbstractKeelServiceTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AdvancedPersistentServiceTest, BasicPersistentServiceTest, CryptoServiceTest, DomainServiceTest, EventServiceTest, GroupManagerServiceTest, GroupServiceTest, JDOServiceTest, PasswordServiceTest, RepositoryTest, ScheduleServiceTest, UserManagerServiceTest, UserServiceTest

public abstract class AbstractKeelServiceTest
extends AbstractKeelTest

AbstractKeelServiceTest can be used as a base class for testing Keel service components. It takes care of acquiring the service from the container. This class is intended to be used in a two-step fashion. First, an abstract class is written that extends this class, implements the getRole() method, and provides all the tests for the service interface. Then, each implementation of the service interface provides a test for each implementation, and also implements the getHint() method to provide the hint that creates that particular implementation.

Version:
$Revision: 1.2 $ $Date: 2004/03/07 16:52:16 $
Author:
SChatterjee @date Mar 3, 2004

Field Summary
 
Fields inherited from class org.keel.util.test.AbstractKeelTest
hint, myContainer
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
AbstractKeelServiceTest(java.lang.String name)
           
 
Method Summary
abstract  java.lang.String getHint()
           
abstract  java.lang.String getRole()
           
 java.lang.Object getServiceUnderTest()
          This is a convenience method to get the service under test.
 
Methods inherited from class org.keel.util.test.AbstractKeelTest
getContainer, getService, main, setUp, suite, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, 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
 

Constructor Detail

AbstractKeelServiceTest

public AbstractKeelServiceTest(java.lang.String name)
Parameters:
name -
Method Detail

getRole

public abstract java.lang.String getRole()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getHint

public abstract java.lang.String getHint()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getServiceUnderTest

public java.lang.Object getServiceUnderTest()
                                     throws java.lang.Exception
This is a convenience method to get the service under test. The role is provided by the abstract testcase for the service interface The hint is provided by the concrete implementataion being tested

Throws:
java.lang.Exception

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.