ossj.common.tck.tests
Class TestJVTSessionSimple

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by ossj.common.tck.JVTTestBase
              extended by ossj.common.tck.tests.TestJVTSessionSimple
All Implemented Interfaces:
junit.framework.Test

public class TestJVTSessionSimple
extends JVTTestBase

tests everything not related to ManagedEntity

Version:
1.2

Field Summary
 
Fields inherited from class ossj.common.tck.JVTTestBase
debug, done, EVENT_TIMEOUT, howmany_key, howmany_value, JMS_FACTORY, JNDI_FACT_CLASS_NAME, JNDI_URL, jvtSessionList, LOG_FILE, namingContext, QUOTECHAR, result, return_failed_only, runonce, TESTFILES_HOME, TOPIC_NAME, util
 
Constructor Summary
TestJVTSessionSimple(String name)
          Creates new TestJVTSessionSimple
 
Method Summary
protected  void setUp()
           
static junit.framework.TestSuite suite()
          Creates the suite of tests
protected  void tearDown()
           
 void test_GetManagedEntityTypes_ContainsACTIVATE()
          getManagedEntityTypes, instantiated from TestBasics
verify that the JVT support at least one managed Entity type using getManagedEntityTypes
 void test_GetQueryTypes_IsNotNull()
          verify that JVT support at least one query type using getNamedQueryTypes.
getNamedQueryTypes instantiated from TestBasics
 void test_GetSupportedOperations_IsSubsetOfJVTSessionOption()
          GetSupportedOperations instantiated from TestBasics.
just call getSupportedOptionalOperations
 void test_GetUpvTypes_IsNotNull()
          verify that JVT support at least one query type using getUpdateProcedureTypes.
getUpdateProcedureTypes instantiated from TestBasics
 void test_JVT_JNDI_NAME()
          Test if the given JNDI name follows: System/System1/ApplicationType/Common/Application/1-1;1-1;ReferenceImplementation/Comp/name or System/System1/ApplicationType/Common/Application/1-1;1-1;ReferenceImplementation/Resource/name
 void test_Negative_NewManagedEntityValue_IllegalValue()
          Test managed entity value using unsupported type
Success if OssIllegalArgumentException is thrown when an invalid (not returned by getTypes) type is given
 void test_Negative_NewManagedEntityValue_NullValue()
          test managed entity value factory using null type
Sucess is makeManagedEntityValue(null) throws OssIllegalArgumentException
 void test_Negative_NewQueryValue_IllegalValue()
          try to create new query value using the factory and invalid query type
Success if OssIllegalArgument is thrown
 void test_Negative_NewQueryValue_NullValue()
          try to create new query value using the factory and null query type
Success if OssIllegalArgument is thrown
 void test_Negative_NewUpvValue_IllegalValue()
          Test Upv value using unsupported type
Success if OssIllegalArgumentException is thrown when an invalid (not returned by getTypes) type is given
 void test_Negative_NewUpvValue_NullValue()
          test Upv value factory using null type
Sucess is makeUpdateProcedureValue(null) throws OssIllegalArgumentException
 void test_Negative_query_NullQuery()
          Query managed entities using null query type
Success if querry(null) throws OssIllegalArgumentException
 void test_Negative_update_NullUpv()
          Update procedure using null type
Success if update(null) throws OssIllegalArgumentException
 void test_Positive_callMethodKeyCreateWithValue()
          Try to find and test methods with the format ManagedEntityKey methodname(ManagedEntityValue)
Success if at leat one method with the profile ManagedEntityKey (ManagedEntityValue) found (the method is called anyway (exception or valid retrn value are correct)
 void test_Positive_callMethodKeysCreateWithValues()
          Try to find and test methods with the format ManagedEntityKeyResults[] methodname(ManagedEntityValue[]) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile MManagedEntityKeyResults[] methodname(ManagedEntityValue[]) found (the method is called anyway (exception or valid retrn value are correct)
 void test_Positive_callMethodValuesMethWithKeys()
          Try to find and test methods with the format ManagedEntityValue[] methodname(ManagedEntityKeys[]) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile ManagedEntityValue[] methodname(ManagedEntityKey[]) found (the method is called anyway (exception or valid retrn value are correct)
 void test_Positive_callMethodValueWithKey()
          Try to find and test methods with the format ManagedEntityValue methodname(ManagedEntitykey) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile ManagedEntityValue methodname(ManagedEntitykey) found (the method is called anyway (exception or valid retrn value are correct)
 void test_Positive_callMethodVoidWithKey()
          Try to find and test methods with the format void methodname(ManagedEntitykey) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile void methodname(ManagedEntitykey) found (the method is called anyway (exception or valid retrn value are correct)
 void test_Positive_callMethodVoidWithValue()
          Try to find and test methods with the format void methodname(ManagedEntityValue) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile void methodname(ManagedEntityValue) found (the method is called anyway (exception or valid retrn value are correct)
 void test_Positive_getEventTypes()
          Verify that the JVT support at least one event type.
For each Event type, verify also the corresponding EventPropertyDescriptor using the factory.
 void test_Positive_NewManagedEntityValue_AllDomainValues()
          newManagedEntityValue Basically test for makeManagedEntityValue Success if a valid value instance is returned:
no null and with Key field populated
 void test_Positive_NewQueryValue_AllDomainValues()
          Verify the query value factory to create new query values
Success if makeNamedQueryValue return none null instance
 void test_Positive_NewUpvValue_AllDomainValues()
          new Upv Value Basically test for makeUpdateProcedureValue Success if a valid value instance is returned:
no null
 
Methods inherited from class ossj.common.tck.JVTTestBase
assertTrue, assertTrue, assertTrueMsg, fail, fail, getEnvironment, getInstanceOf, init, log, log, run, run
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, 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, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestJVTSessionSimple

public TestJVTSessionSimple(String name)
                     throws Exception
Creates new TestJVTSessionSimple

Throws:
Exception
Method Detail

setUp

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

tearDown

protected void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

suite

public static junit.framework.TestSuite suite()
                                       throws Exception
Creates the suite of tests

Returns:
the object encapsulating the suite of test
Throws:
Exception

test_JVT_JNDI_NAME

public void test_JVT_JNDI_NAME()
                        throws Exception
Test if the given JNDI name follows: System/System1/ApplicationType/Common/Application/1-1;1-1;ReferenceImplementation/Comp/name or System/System1/ApplicationType/Common/Application/1-1;1-1;ReferenceImplementation/Resource/name

Throws:
Exception

test_GetManagedEntityTypes_ContainsACTIVATE

public void test_GetManagedEntityTypes_ContainsACTIVATE()
                                                 throws Exception
getManagedEntityTypes, instantiated from TestBasics
verify that the JVT support at least one managed Entity type using getManagedEntityTypes

Success if the the return array is not null and not empty

Throws:
Exception

test_GetQueryTypes_IsNotNull

public void test_GetQueryTypes_IsNotNull()
                                  throws Exception
verify that JVT support at least one query type using getNamedQueryTypes.
getNamedQueryTypes instantiated from TestBasics

Success if the the return array is not null and not empty

Throws:
Exception

test_GetUpvTypes_IsNotNull

public void test_GetUpvTypes_IsNotNull()
                                throws Exception
verify that JVT support at least one query type using getUpdateProcedureTypes.
getUpdateProcedureTypes instantiated from TestBasics

Success if the the return array is not null

Throws:
Exception

test_GetSupportedOperations_IsSubsetOfJVTSessionOption

public void test_GetSupportedOperations_IsSubsetOfJVTSessionOption()
                                                            throws Exception
GetSupportedOperations instantiated from TestBasics.
just call getSupportedOptionalOperations

Success if no exceptiuon is thrown.

Throws:
Exception

test_Positive_NewManagedEntityValue_AllDomainValues

public void test_Positive_NewManagedEntityValue_AllDomainValues()
                                                         throws Exception
newManagedEntityValue Basically test for makeManagedEntityValue Success if a valid value instance is returned:
no null and with Key field populated

Throws:
Exception

test_Negative_NewManagedEntityValue_NullValue

public void test_Negative_NewManagedEntityValue_NullValue()
                                                   throws Exception
test managed entity value factory using null type
Sucess is makeManagedEntityValue(null) throws OssIllegalArgumentException

Throws:
Exception - DOCUMENT ME!

test_Negative_NewManagedEntityValue_IllegalValue

public void test_Negative_NewManagedEntityValue_IllegalValue()
                                                      throws Exception
Test managed entity value using unsupported type
Success if OssIllegalArgumentException is thrown when an invalid (not returned by getTypes) type is given

Throws:
Exception - DOCUMENT ME!

test_Positive_NewUpvValue_AllDomainValues

public void test_Positive_NewUpvValue_AllDomainValues()
                                               throws Exception
new Upv Value Basically test for makeUpdateProcedureValue Success if a valid value instance is returned:
no null

Throws:
Exception

test_Negative_NewUpvValue_NullValue

public void test_Negative_NewUpvValue_NullValue()
                                         throws Exception
test Upv value factory using null type
Sucess is makeUpdateProcedureValue(null) throws OssIllegalArgumentException

Throws:
Exception - DOCUMENT ME!

test_Negative_NewUpvValue_IllegalValue

public void test_Negative_NewUpvValue_IllegalValue()
                                            throws Exception
Test Upv value using unsupported type
Success if OssIllegalArgumentException is thrown when an invalid (not returned by getTypes) type is given

Throws:
Exception - DOCUMENT ME!

test_Positive_NewQueryValue_AllDomainValues

public void test_Positive_NewQueryValue_AllDomainValues()
                                                 throws Exception
Verify the query value factory to create new query values
Success if makeNamedQueryValue return none null instance

Throws:
Exception

test_Negative_NewQueryValue_NullValue

public void test_Negative_NewQueryValue_NullValue()
                                           throws Exception
try to create new query value using the factory and null query type
Success if OssIllegalArgument is thrown

Throws:
Exception - DOCUMENT ME!

test_Negative_NewQueryValue_IllegalValue

public void test_Negative_NewQueryValue_IllegalValue()
                                              throws Exception
try to create new query value using the factory and invalid query type
Success if OssIllegalArgument is thrown

Throws:
Exception - DOCUMENT ME!

test_Negative_query_NullQuery

public void test_Negative_query_NullQuery()
                                   throws Exception
Query managed entities using null query type
Success if querry(null) throws OssIllegalArgumentException

Throws:
Exception - DOCUMENT ME!
TCKException - DOCUMENT ME!

test_Negative_update_NullUpv

public void test_Negative_update_NullUpv()
                                  throws Exception
Update procedure using null type
Success if update(null) throws OssIllegalArgumentException

Throws:
Exception - DOCUMENT ME!
TCKException - DOCUMENT ME!

test_Positive_callMethodKeyCreateWithValue

public void test_Positive_callMethodKeyCreateWithValue()
                                                throws Exception
Try to find and test methods with the format ManagedEntityKey methodname(ManagedEntityValue)
Success if at leat one method with the profile ManagedEntityKey (ManagedEntityValue) found (the method is called anyway (exception or valid retrn value are correct)

Throws:
Exception - DOCUMENT ME!

test_Positive_callMethodKeysCreateWithValues

public void test_Positive_callMethodKeysCreateWithValues()
                                                  throws Exception
Try to find and test methods with the format ManagedEntityKeyResults[] methodname(ManagedEntityValue[]) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile MManagedEntityKeyResults[] methodname(ManagedEntityValue[]) found (the method is called anyway (exception or valid retrn value are correct)

Throws:
Exception - DOCUMENT ME!

test_Positive_callMethodValuesMethWithKeys

public void test_Positive_callMethodValuesMethWithKeys()
                                                throws Exception
Try to find and test methods with the format ManagedEntityValue[] methodname(ManagedEntityKeys[]) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile ManagedEntityValue[] methodname(ManagedEntityKey[]) found (the method is called anyway (exception or valid retrn value are correct)

Throws:
Exception - DOCUMENT ME!

test_Positive_callMethodVoidWithValue

public void test_Positive_callMethodVoidWithValue()
                                           throws Exception
Try to find and test methods with the format void methodname(ManagedEntityValue) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile void methodname(ManagedEntityValue) found (the method is called anyway (exception or valid retrn value are correct)

Throws:
Exception - DOCUMENT ME!

test_Positive_callMethodValueWithKey

public void test_Positive_callMethodValueWithKey()
                                          throws Exception
Try to find and test methods with the format ManagedEntityValue methodname(ManagedEntitykey) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile ManagedEntityValue methodname(ManagedEntitykey) found (the method is called anyway (exception or valid retrn value are correct)

Throws:
Exception - DOCUMENT ME!

test_Positive_callMethodVoidWithKey

public void test_Positive_callMethodVoidWithKey()
                                         throws Exception
Try to find and test methods with the format void methodname(ManagedEntitykey) If call to the method is successful the isSuccess or getException method are called on all returned ManagedEntityKeyresults
Success if at leat one method with the profile void methodname(ManagedEntitykey) found (the method is called anyway (exception or valid retrn value are correct)

Throws:
Exception - DOCUMENT ME!

test_Positive_getEventTypes

public void test_Positive_getEventTypes()
                                 throws Exception
Verify that the JVT support at least one event type.
For each Event type, verify also the corresponding EventPropertyDescriptor using the factory.
Success
if getEventTypes return no null and at least 1 event type and if (getEventDescriptor) for each type return a valid event propertyDescriptor (correct event type value) and if makeEvent(type) do not throw any exception and returnan instance of the desired event type

Throws:
Exception - DOCUMENT ME!


Copyright 2002-2006 The Members of the OSS through Java(TM) Initiative. All rights reserved. Use is subject to license terms.